Marking plural of code words
In my blog (which is about programming) I often use reserved words from different programming languages.
Like this:
When column is nullable in both tables, this query won't return a match of two NULLs for the reasons described above: no NULLs are equal.
Here, NULL
is a programming language keyword.
For numerous reasons, I mark them with <code>
tag so they are rendered with a fixed width font, not translated into the foreign languages by Google Translate, can easily be seen on the page etc.
In the example above, which would be the best way to mark the plural?
-
NULL
s -
NULL
s -
NULL
's NULLs
NULLS
Option 1 looks ugly on the page (the word and the plural marker are rendered in different colors and fonts)
Option 2 adds a space between the word and the plural marker
Option 3 looks nicest but is not correct
Options 4 and 5 may leave the reader under impression that NULLS
is a reserved word (which is not true) and this may be confusing. Also, Google Translate would leave the word as is which would be definitely wrong in other languages.
What would be the least of 5 evils?
Solution 1:
Definitely don't use an apostrophe or a capital S to pluralize NULL
.
As a programmer, I'd suggest formatting it as NULL
s. I think your readers will understand that.
I'd also recommend considering rewriting sentences like that to obviate the need to pluralize NULL
. For example:
When column is nullable in both tables, this query won't return a match of two
NULL
values for the reasons described above: noNULL
values are equal.
Solution 2:
You don't have to pluralize these code words, because you can always write them as adjectives. For example:
How to compare
NULL
valuesDo not write too many nested
while
blocks.Make sure that you map the
getDatabasePrimaryKey()
methods.