From: HarryO Date: 2001-11-17T04:24:34+09:00 Subject: [ruby-talk:25612] Re: Constants and Variables > Many languages have naming conventions for constants, functions, > classes, etc to make programs easier to read. In some cases (for example > Java) the conventions are so strong that violating them should be > considered a programming error (for example naming a class like_this in > Java). I understand what you're saying, but call on my inalienabke right to disagree with you :-). While I accept that it makes sense to save some typing and parsing by using the name of a variable to define its sementics, I would much rather see another prefix or a keyword. The reason is that sometimes capital letters make sense. A contrived example would be if I had a parameter for estimated time of arrival and wanted to call it ETA. Rather than being forced to make it something like "estimated_arrival_time", when anyone reading the code would understand what ETA means. I realise this sort of thing doesn't happen very often, and it's not hit me at all, but I agree with the original poster's comment that it's nicer to not give semantic content to names like this. By the way, a mate of mine hit this problem with the first piece of code he wrote! He was writing some astronomy software and used an accepted astronomical abbreviation for one of the parameters to a routine. The fact that he couldn't work out what was going wrong pushed him away from ruby for ages, until I asked him why he didn't like it and was then able to explain what was going wrong. In his case, everyone else wrote their code in perl, and everyone used that abbreviation, because it's part of their standard vocabulary. Hence, being forced to use something else was very annoying. Of course, I don't think we can do it with just a character, as has been done with the scoping of variables, since you could have constants at any level. Hence, I think perhaps we would need a keyword. I also realise that this is almost guaranteed never to be changed, since very few people will agree with those of us who consider this a problem and there's probably a lot of code out there already that relies on the capitalisation :-).