[Twisted-Python] coding standard: plurals for database table names
Clark C. Evans
cce at clarkevans.com
Mon Apr 7 15:45:51 MDT 2003
On Mon, Apr 07, 2003 at 04:15:51PM -0400, Glyph Lefkowitz wrote:
| On Monday, April 7, 2003, at 03:37 PM, Clark C. Evans wrote:
| >| One could reasonably argue that it is not important to have
| >| a table-naming rule in the coding standard.
| >
| >That makes sense. I'd rather no standard is better than
| >a bad one. ;) Clark
|
| I disagree.
I feel almost embarrassed to bring this item up, as it seems so
trivial... but I think it deserves to be reviewed.
Everything else in the coding standard is very clear and resonably
justified. This particular item just stands out from the rest as
quite arbitrary -- and based on my experience, giving addititional
complexity without any commensurate advantages, especially for
those who do not have English as their primary language.
The English language can be quite complex, and Plurals and
their rules are a good part of this complexity. For example,
plural nouns often sound the same as posessive nouns, and this
makes learning them more difficult. Furthermore, plurals have
irregular forms, or use s or es, sometimes dropping one or more
letters before the modifier. Even the notion of plurals themselves
is not really a universal construct, as I understand some
languages use an adjective meaning 'one or more' in conjunction
with singluar nouns to make them plural rather than modifying
the word itself. Some words are used as both singluar and
plural. And lastly, plurals enter into the whole range of
collective nounds, which differ in their singluar/plural treatment
depending if you are English or American. In short, it's just ugly.
And there isn't any advantage to *requiring* them; especially
when Internationalization is important.
The only somewhat-convincing argument that I've heared for it,
is that "SELECT * FROM people" seems to make more sense than
"SELECT * FROM person". However, even this advantage falls
apart as soon as you add a where clause...
SELECT first_name FROM people
WHERE people.last_name = 'Evans'
I like person.last_name myself...
| While I don't feel particularly strongly about it one way or another,
| pretty much anything that isn't language-mandated ought to be
| standardized so that newcomers to the codebase at least get a common
| feel for certain kinds of naming.
I feel that too much standardization can be a bad thing,
especially when they bring unnecessary complexity.
Best,
Clark
More information about the Twisted-Python
mailing list