From: dblack@... Date: 2005-12-09T01:00:54+09:00 Subject: Re: They say I write Ruby like Perl Hi -- On Thu, 8 Dec 2005, Rich wrote: > I'd be interested to know *why* it is a language convention, and more > important why it is a lanaguage convention that from this thread it > seems rubyists vigorously insist upon? For those of us who were > "raised" with a language like Java (or as some on this list may say, > brain damaged ;-), lowerCamelCase seems more pleasing to the eye than > identifiers_with_underscores. When using Ruby, it's best to think of yourself as "raised with Ruby". It saves all kinds of trouble :-) Anyway, underscore names are a convention in Ruby partly because Matz dislikes cAmElCaSe :-) But that's just the origin (or perhaps a "creation myth"). There are now many years, and millions of lines of code, written in the traditional style or something close to it. At to what a given person does: I guess it's a matter of whether you feel that these things are absolute or relative. Or, perhaps, whether you can put aside the absolute interpretation for the sake of consistency with the traditions. I tend to try to use the conventions of whatever language I'm using. Even though I hate the look of camelCase variable names, I've used them in languages where it would have seemed doctrinaire or "culturally" weird not to. Part of it, I think, is coming to believe that Ruby is not a sort of clearing-house for conventions and practices from other languages, but is itself a language, with people "raised" in it, people who "come from" it, and so forth. Still -- the parser will allow camelCase, all the extra semi-colons you want, printf("%s\n",str); and all the rest of it. In that sense it's an inclusive language -- but it's not a fledgling project, and a set of conventions does exist. David -- David A. Black dblack@wobblini.net "Ruby for Rails", forthcoming from Manning Publications, April 2006!