On Jan 28, 2008, at 11:27 PM, Loqi wrote:
But it's an abusive love. All because of Rails' compulsive pluralization predilection. I just want to have my identifiers stay right where I put them! It makes me sob with despair when my productivity tools are so needy. I hate Microsoft Clippy, and not just because he's got the stink of Gates on him ("You seem to be trying to accomplish something...").
I'm definitely in the camp of hating helpful software, that's why I can't use IDEs. Stop trying to think for me!
Natural languages are for artfully conveying meaning among humans. Programming languages are for precisely controlling logic machines. Why is Rails trying to make my code somewhat grammatically correct some of the time? It'd be one thing if I were allowed to mix and match singulars and plurals at will. That would be easier on Rails developers and Rails users alike. Even I would welcome such a feature. But instead, my code breaks when the plurality is incorrect. Plus, some parts of Rails choke on fish! (see http://railsforum.com/viewtopic.php?id=14929)
Can someone please explain to me some advantage to having my identifiers shift under my feet like this? It creeps me out, and makes me feel dirty.
I think they got carried away. I remember in the early days it made sense to name your model Article (a single article representing one row) and your table articles (a collection of article rows). But things got a bit weird when they started to move the practice to controllers with REST. I don't fully understand the motivation behind having a plural controller vs. a singular controller semantic difference and convention. This looks like convention gone bad where the conventions get so complex you wish you could configure ;-p
My take is this, it was nice for models, tables, and associations.
Article => articles
It was a bad idea for controllers. A controller should have only one form and it shouldn't make any difference if it's singular or plural. Let the routes dictate the mapping. Viva la revolution!