I have been meaning to write this post for a long time. In fact, my
motivation for this post started about 6 years ago when I was using a
program which converted English descriptions to C language
expressions. One interesting thing about this program was the way it
required you to write about arrays which was different from the way we would
describe them in English. For example in English, we think nothing of
saying "bag of potatoes".
And then moving on to Perl, we might also
think nothing of saying "array of integers"
which we might think is
equivalent to the Perl sentence:
But this particular converter would balk at you. It would say that it is more precise to say you have an array in which each element is an integer, not an "array of integers".@int = ( 2 .. 5 ) ;
Stated another way, plurality is implicit in the word "array" or the symbol @ It is redundant to pluralize the name of the array.
Now, for the node that re-stimulated this thought pattern: the title was $functions xor $methods. But let's think: a scalar holds a single value, right? Therefore most people would correct this as
@functions or @methods
But me personally, I would write it as
because the plurality is indicated by the @sign.@function or @method
update Finally, the way that we modify nouns for plurality is not done in chinese. You figure out that something is plural by the number of them mentioned or by something like Perl's @ sign.
Back to
Meditations