1

Swift code has a column limit of 100 characters. Except as noted below, any line that would exceed this limit must be line-wrapped as described in Line-Wrapping. - https://google.github.io/swift/

Fixed a bug where Room would not correctly detect the JDK version used to enable incremental annotation processor. - https://developer.android.com/jetpack/androidx/releases/room

Are there any reasons to use would in such cases? Why not rephrase these passages in the simple present tense?

My version: Swift code has a column limit of 100 characters. Except as noted below, any line that exceeds this limit must be line-wrapped as described in Line-Wrapping.

My version: Fixed a bug where Room does not correctly detect the JDK version used to enable incremental annotation processor.

3
  • 1
    Any line that exceeds this limit: no need at all for would. And this is editing and basic grammar.
    – Lambie
    Aug 19, 2020 at 16:49
  • 1
    Short answer it is correct, and the reason is explained in the article on subjunctive mood.
    – J D
    Aug 19, 2020 at 17:21
  • Ha ha, it seems that Google itself discourages such a practice of using would: "Also avoid the hypothetical future would." The examples are here: developers.google.com/style/tense
    – user90726
    Aug 19, 2020 at 22:11

3 Answers 3

1

There is a chance that the author may use would as an optative - assuming a possible future state of a noun. Archaic as the optative case may seem, it is commonly applied in less-formal conversation - almost suggesting an anthropomorphic ascription to an inanimate subject of a sentence. The word would can simply serve as a conditional marker and nothing more need be read into it. "If this, then that would be the case." "If it would have such and such attribute, then such and such will take place."

8
  • 1
    No, would is wrong here.
    – Lambie
    Aug 19, 2020 at 16:51
  • Probably not wrong, just not the best choice.
    – Dan
    Aug 19, 2020 at 17:25
  • @Dan This is not the optative, but the pluperfect subjunctive. See en.wikipedia.org/wiki/Subjunctive_mood#English
    – J D
    Aug 19, 2020 at 17:34
  • @JD It doesn't matter much what you want to call it. pluperfet is clearly an invention from French schools, it should have hardly any relevance here, and there is nothing more than past perfect about the ... wait, which example are we talking about, lol. I mean the first is optative in spirit. but the second is plain past tense of a modal verb
    – vectory
    Aug 19, 2020 at 21:43
  • 1
    @vectory Sorry for the delayed response. 'Let's' is hortitative, not optative, I believe.
    – J D
    Sep 2, 2020 at 15:37
0

Your version is clear, uncomplicated, and grammatical. I see "would" as a subjunctive, expressing a possibility or desire. A line cannot "desire". That being the case, why do we attribute possibility to a line? Either it exceeds the limit (in which case it becomes wrapped) or not (in which case we are not interested in any other possibility). "would" is merely confusing and redundant.

5
  • Frankly, not a good answer would is wrong here and would not express a possibility or desire....
    – Lambie
    Aug 19, 2020 at 16:49
  • "why do we attribute possibility to a line?" There are people around who started on collumn row displays where the size of a line is fixed; who also programmed computers, where the length of a row should be preferably redefinable; who have seen these things change. And then there's people who apologize for them. "A line cannot "desire"." It can't "exceed" either but you have no problem using that. Your country-grammar doesn't generalize: The given use of "would" reflects archaic inherented meaningful features. Only they aren't distinguished in form any more.
    – vectory
    Aug 19, 2020 at 21:12
  • You are not answering the question, "Are there any reasons ...?" and you don't show if there are no reasons at all. You only show that one reason is not. Which is nearly nothing, to be honest.
    – vectory
    Aug 19, 2020 at 21:16
  • Some delightful vituperation there. Most entertaining. Many thanks,
    – Anton
    Aug 19, 2020 at 22:18
  • The line does not wrap, so the simple present is unsuitable; "would" expresses a hypothetical. It is also common to the use of "would otherwise" in such a condition: "any line that would otherwise exceed this limit must be line-wrapped". After being line-wrapped it does not exceed the condition. Obviously there are issues of style, but it is not redundant or confusing.
    – Stuart F
    Aug 31, 2022 at 14:19
0

In your example, the term 'would' is used as part of counterfactual. What this means is that one cannot use the normal conditional "if it IS more than a hundred" because it contradicts the assertion there is a limit. From Wikipedia:

Examples

The difference between indicative and counterfactual conditionals can be illustrated by the following contrast:

Indicative: If it is raining right now, then Sally is inside. Counterfactual: If it were raining right now, then Sally would be inside.

The verb mood when used like this is the subjunctive. In fact, your example counterfactual conditional uses the pluperfect subjunctive to be more specific. From Wikipedia's article on subjunctive:

The English subjunctive also occurs in counterfactual dependent clauses, using a form of the verb that in the indicative would indicate a time of action prior to the one implied by the subjunctive. It is called the past subjunctive when referring counterfactually to the present, and is called the pluperfect subjunctive when referring counterfactually to the past.

As to why is this construction used, instead of the indicative? A fluent English speakers conveys the fact that the line can't actually be more than 100 characters entered in the software, but at the same describes it correctly as it is 100 lines outside the software. Thus, it communicates the possible states of the line both inside and outside, and tackles the assumption that it could be more than 100 by grammatically indicating it is a counterfactual. More simply, the 'would' be 100 implies it 'can't' be 100.

Could the passage be written without using a conditional counterfactual and using the subjunctive? Yes. However, it impoverishes a language to remove more complicated constructions. Consider 'can' and 'may'. More speakers than not use 'can' to ask questions of permission. But, then speakers have to rely on context to determine whether the use of can indicates permission or ability. If one uses may, there is certainty. When one asks 'May I go to the restroom?', one sees the request for permission (and avoids the usual silliness of retorting "I don't know, can you?" to the question "Can I go to the restroom?")

See also the article on the past subjunctive.

EDIT TO REBUT CRITICISM:

LOGICAL BASIS FOR COUNTERFACTUALLITY

"Code, in the reality of the real world, has no line limit." Ontologically speaking, reality is a rather disputatious subject; however, this statement would be rejected by most because it would entail the physical construction of a Universal Turing Machine. Strictly speaking, it is not possible because there are no infinite resources for the construction of any machine, a requirement of the TM.

In fact, the majority of computer scientists I know reject actual infinity for the potential sort. A major point of the computer science curriculum is to come to grips with temporal-spatial constraints of a computer. There aren't actually an infinity of numbers, but rather a number of any size can be potentially generated.

As for wrapping a line, that is essence splitting a string in some sense. Line wrapping in an editor takes a string and prints the string as multiple strings on the display. The source and destination strings actually exist in different buffers, and are physically speaking, different strings with different addresses. Not to get too technical on formal languages, but if the input exceeds the limit of procedure that transfers the string to the application's stack (from wherever to wherever in the architecture), what's really happening is that the original string is programmatically copied into multiple strings using a metalanguage. Thus, one has application-level strings and file-system strings in wrapping. For example, the former might be SWIFT's formatting of the input: "P1_Input%EOL%P2_Input%EOL%P3_Input%EOL%\n" from the input "P1_InputP2_InputP3_Input\n"...

If Len("P1_InputP2_InputP3_Input\n") > STRING_MAX then to have in the application is counterfactual. It would be allowed, if one were to consider "P1_Input%EOL%P2_Input%EOL%P3_Input%EOL%\n" an equivalent string, but strictly speaking it is not. It's not uncommon to think of computation as essentially unlimited, but a careful study of the subject will reject that.

Besides, the author clearly uses the subjunctive. The subjunctive is the biggest clue to the nature of the illuctionary intent of the author. It is certainly not unreasonable on a small project documented by a coder that such a distinction between input and output strings would drawn.

8
  • There is nothing "counterfactual" about this at all. A unicorn would be counterfactual, but not a line of code that could very possibly exceed a line limit. Aug 19, 2020 at 18:19
  • @JasonBassford You make a claim, but neither an argument nor cite sources. If a line of code is prohibited from being greater than a limit in an IDE, then to refer to that line in the context of an IDE as being greater would have to be counterfactual, because it is a fact that limit prevents it from being true in the IDE. In fact, since you're a technical writer, you know that a UI may indeed accept more characters than the engine of the application accepts with input checking. So, it may have been the author's intent to disambiguate 100+ characters in the UI from the<=100 that are allowed...
    – J D
    Aug 19, 2020 at 19:37
  • In fact, the perlocutionary act desired is obviously is the avoidance of attempting to have the user be confounded by the character limit. That the author's intent is to communicate the nature of transition the disallowed string requires truncation. In essence, the communication can be paraphrased as such: The 100+ char string you have would be 100+ when you enter it except that our system disallows more than 100 (either by manual or automatic truncation depending on the logic behind the UI and the back-end).
    – J D
    Aug 19, 2020 at 19:42
  • A counterargument from someone with your experience would be appreciated to help me see where my lines have been fouled.
    – J D
    Aug 19, 2020 at 19:43
  • J D, I'm not pretend to interrupt your and Jason's discussion, but Swift is not IDE; it is a programming language. The sentence "Swift code has a column limit of 100 characters" have the same meaning as "Each sentence should have a limit of 100 letters". It is a recommendation to a writer (programmer).
    – user90726
    Aug 19, 2020 at 19:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.