9

Possible Duplicate:
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).

  • 1
    Whatever else, but the apostrophe is just horribly wrong there. It’s neither a possessive nor an omission. But see also (Wikipedia) Apostrophe: use in forming certain plurals. – Konrad Rudolph Dec 02 '10 at 12:07
  • Speaking to it from a programming perspective, what on earth is "too long" about a simple 50-character sentence? The original is straightforward and understandable to your target audience; why do you need to shorten it further? – Hellion Dec 02 '10 at 15:44
  • Is "no implementation for..." a technical term? Because on the face of it, I'd write something like Global-level 'try' is not implemented. – Marthaª Dec 02 '10 at 17:10
  • @Colin Fine - That question certainly does a fine job of answering my question for being a duplicate. As I pointed out - it doesn't. – aaronasterling Dec 02 '10 at 18:39
  • @Konrad Rudolph - From the wiki - apostrophes are used whe their omission would "leave things ambiguous or inelegant." In this case, I lean towards the inelegant clause. At any rate, I'm much more concerned with how this looks to the eyes able English speakers than in any artificial 'rules' which some elite might or might not have written down :) – aaronasterling Dec 02 '10 at 18:46
  • @Martha - Excellent idea. – aaronasterling Dec 02 '10 at 18:55
  • @Hellion. 1) It's too long in my source and I would like to avoid doing something storing it in a string and then passing it. 2) I'm curious about how to pluralize these and even if I do end up splitting it a across lines, (which I'm currently doing) I'd want to know how I would have pluralized it. It seems weird that there would be non-mass nouns that can't be pluralized. – aaronasterling Dec 02 '10 at 18:59
  • @aaron: that was my point: it looks horrible to my eyes. But I actually agree with you: it’s more important how it looks than that it conforms to a set of arbitrary rules that some Latin-obsessed 17th century introverts have decided upon. And I think that I’m probably in the minority with my taste. – Konrad Rudolph Dec 02 '10 at 19:08
  • @Konrad Rudolph. Indeed. Looking at my previous comment, I'd say that you're more able than me this morning. Great comic. I too think that you might be in the minority. As a member of the minority, what do you think of Jon Purdy's suggestion of putting keywords in quotes and pluralizing that normally? Do you think "try"s Looks alright? – aaronasterling Dec 02 '10 at 19:18
  • 1
    @aaron: (re Jon’s suggestion) that’s in fact how I would handle it. – Konrad Rudolph Dec 02 '10 at 19:39
  • Try this, catch. – Mateen Ulhaq Nov 16 '11 at 05:41

4 Answers4

7

I would rather leave any language keyword alone (as in "non pluralized"), and convey the pluralization otherwise, like:

No implementation for all global level "try".

or

No implementation for any global level "try".

VonC
  • 14,744
  • Good stopgap solution, but doesn't work in the general sense. There will be a need to pluralize keywords eventually. – Pacerier Jul 06 '14 at 04:54
7
  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.
Jon Purdy
  • 32,386
5

I believe the difficulty you're having is because although we use English words as the basis for programming languages, once they are used as such they are no longer English Words, but are tokens, identifiers or otherwise non-English symbols.

This being the case, the rules of English usage can no longer be applied as if this was still a "word" used as the part of speech your "ear for English" would expect. Enclosing the item in quotes, as suggested by VonC highlights the fact that the item in question has evolved into a non-English object.

3

There is in fact a very long-standing pluralisation rule that apostrophes can be used to pluralise words that are used as themselves, rather than in terms of what they signify. For example, "No if's and but's". ("Do's and don'ts" complicates it by avoiding a double apostrophe in the second case, though that's also sometimes found).

It's a rule that some style-guides recommend against, particularly if style (italics for words used as here, a monospace font for computer keywords) already does the job of making the word stand apart from the pluralising s, but it certainly is valid.

Your "try's" would be analogous.

I would though, personally prefer the likes of "trys", where font-change is used. The cases where apostrophes are used in plurals are less and less common, and the use of a different font to highlight when a computer context is intended will make other passages clearer too.

Jon Hanna
  • 53,363