grammatical number - Pluralizing keywords in programming languages





Marking plural of code words



In the language that I'm currently working in one of the keywords is try. I'm writing an error message:



No implementation for global level try statements.



It's too long in my source and so I would very much like to reduce it to



No implementation for global level try's.



Anybody using my code should understand it very easily as my code is entirely about dynamically determining what exception handling is in place and the try keyword is one of the cornerstones of exception handling in the given language.



  1. Could we pretend for the duration that I'm not being overly picky?

  2. Is this pluralization correct or at least acceptable? Both "tries" and "trys" look very wrong to me.

  3. Are there general rules pertaining to pluralizing keywords and other identifiers from programming languages. A quick google search and more extensive search of this site didn't quite do it. I did find this question. The selected answer assumes the presence of markup (not available in my case) and the other answer sidesteps the issue by avoiding pluralizing the words in question. Are there any new insights to be had?


An answer to (3) would answer (2) of course and so I would be happy with just that. If it's not available though, I would appeciate input on (2).



Answer





  1. You're not.




  2. If you're consistent about how you do it, it doesn't really matter how you do it. I would go for trys or "try"s, though, because




  3. You should never inflect a keyword (tries), just like you shouldn't capitalise it at the start of a sentence ("Try is for exceptions"), especially in the most common case that the language is case-sensitive; keywords are taken painfully literally by a compiler, so literature must reproduce them with painstaking exactness.




As VonC states, it's probably best to just re-word, though as the convention with functions is to append parentheses (foo()), you might try appending braces if your language is block-delimited:


No implementation for global-level try{}s.

Comments

Popular posts from this blog

verbs - "Baby is creeping" vs. "baby is crawling" in AmE

commas - Does this sentence have too many subjunctives?

time - English notation for hour, minutes and seconds

grammatical number - Use of lone apostrophe for plural?

etymology - Origin of "s--t eating grin"

etymology - Where does the phrase "doctored" originate?

word choice - Which is the correct spelling: “fairy” or “faerie”?