[Tutor] Name for this type of class?
Roel Schroeven
roel at roelschroeven.net
Tue Aug 6 14:30:09 EDT 2019
Mats Wichmann schreef op 3/08/2019 om 19:16:
>>> file_count
>>> line_count
>>> byte_count
>>> ...
>
> why not "files", "lines", "bytes"... the plural form already tells you
> it's a counter.
> Opinions, we all have 'em :)
We do, and in this case I strongly disagree with yours :)
To me a plural indicates a collection of items, not a number of items.
It may seem a small detail, but when I see "files" in a codebase to
indicate a count, instead of "file_count" or "nr_files" or "num_files",
it always takes me a moment of reflection to graps the meaning. Every
time again.
If you use plural to indicate counts, what do you use for collections of
items?
--
"Honest criticism is hard to take, particularly from a relative, a
friend, an acquaintance, or a stranger."
-- Franklin P. Jones
Roel Schroeven
More information about the Tutor
mailing list