Re:SQL style guide
by throwaway745234 on Sunday October 09, 2016 @04:34PM
(#12673307)
Ian Mackinnon, is that you? (http://stackoverflow.com/a/3894235/1163893)
Re:SQL style guide
by exceptione on Sunday October 09, 2016 @05:43PM
(#12673665)
Nope, i am not. But good catch, since his comment on SO made me originally see the light. :)
Re:SQL style guide
by dragonwriter on Monday October 10, 2016 @03:33PM
(#12679277)
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.
Re:SQL style guide
by thijsvandien on Monday October 10, 2016 @03:24PM
(#12679233)
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]);
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.
oh wait, we have a from so we need an ablative plural here. So we get: What about updating? Then we need a plural accusative form: 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?