From: Charles Hixson Date: 2004-03-24T16:17:53+09:00 Subject: Re: proposal - enforce lower_case for variables and methods -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Simon Strandgaard wrote: | Ruby does already enforce CamelCase for class/modules. | | 'camelCase' for variables/methods is easy to confuse with | ClassNames. Its hard to distinguish for newcomers if they should | use 'under_score' syntax or 'camelCase' syntax. If the person has a | Java background it may be natual though (but being friendly to Java | persons may hurt Ruby). | | However I don't use 'camelCase' and I tend to _avoid_ libraries | which uses forces me to it. Luckily many of them provide underscore | aliases. | | In Ruby2 it would be nice to get rid of 'camelCase', so that | 'under_score' naming is enforced by the language. | | Should I submit an RCR about this ? Resistance ? any good reasons | to use camelCase ? | | -- Simon Strandgaard I would consider this a very bad idea. OTOH, I'm not sure that the suggestion of making case, and perhaps underscored, non-semantic isn't a good idea. I.e., Item === item === ItEm === i_T_e_M But probably the special nature of the first letter should be retained. Everybody is alreay aware that, e.g., Polish isn't the same as polish. OTOH, NASA === N.A.S.A === nasa. Analogies with natural languages are always slippery, but perhaps this is a reasonable one. Still, if the decision is to forbid camelCase, I won't loose any sleep over it. I just think it a poor, and somewhat arbitrary, idea. You could even go all lispish, and use internal asterisks for markers if you wanted. I'd think it a poor idea, but I could live with it. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFAYTVBE1guSVL8NK8RAh+TAKDcohymggF2AU5mYcYKDEKvbn3aLQCgtsfk OekUXmm0LSekqH0PzkbMaMs= =aPLB -----END PGP SIGNATURE-----