Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The debate about singular/plural naming for relations comes up frequently. In my opinion, it stems from the fact that English has only 2 forms for all the possible grammatical cases. It has only a different form for the singular and plural cases, and thats what people concentrate on. I propose to take a step back.

There are quite some languages that have different forms for the nominative, accussative, dative and genetive case. Lets take Latin and the concept of an unpaid developer (servus).

Servus is nominative singular. Lets make it plural: servi.

 Select from servi... 
oh wait, we have a from so we need an ablative plural here. So we get:

 select from servis... 
What about updating? Then we need a plural accusative form:

 update servos... 
But are we updating the whole collection or just a single record? Then we should probably talk about servum. Et cetera ad infinitum.

This might be a little overstretched.. Why don't we just use the normal form (the style guide talks about natural) of a noun? Good question, that is the singular nominative form. So, why make a special case for plural and ignore al other grammatical concerns?



Ian Mackinnon, is that you? (http://stackoverflow.com/a/3894235/1163893)


Nope, i am not. But good catch, since his comment on SO made me originally see the light. :)


Honestly, if Latin-speakers had invented high-level programming languages (and, especially, languages intended for the kind of use and audience that motivated the design of SQL), they'd probably just include noun declensions as part of the declaration, and then decline the noun properly for the way they were used, rather than settling on single form.

Yes, that's not something we'd do with Latin declensions in a language designed by English speakers, but that isn't really an argument against naming collections with plural nouns in such a language, just because doing what might be natural in a language designed by Latin speakers to resemble Latin doesn't make sense to us.


It makes me curious if you apply the same rule to variable names in (other) programming, when they contain multiple items of a kind (e.g. arrays, lists, sets and so on).

 FrequentCustomerArray 
rather than

 FrequentCustomers 
? If not, why is that different?


It isn't different. There's a conflict between using the collection as a whole

 map(foo, FrequentCustomers) 
and using a member

 foo(FrequentCustomer[0]) 
Perl has plural / singular inflection :-)

 map foo($_), @FrequentCustomer; foo($FrequentCustomer[0]);




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact