From: James Britt Date: 2004-03-25T05:03:17+09:00 Subject: Re: proposal - enforce lower_case for variables and methods Simon Strandgaard wrote: > I am very curious to know where mixed case can be useful. > I have a short section about Ruby's naming conventions, but having > big trouble explaining why Uppercase letters is allowed in varnames and > methods. Interesting perspective. I would think that such explanations would only be needed when Ruby allows something that seems to contradict some fundamental language construct. Otherwise, users should assume they are free to do as they like, rather than think they need permission to do something. For example, I at first assumed that a class name could be anything I wanted. I found out that was false, but that there's a particular reason for it; it's part of the Ruby ground rules, and it allows the interpreter to make certain assumptions about your code, such that other things are either easier to do (or simply possible). In general, I expect that if a language prevents me from doing something it's because the restriction buys me greater freedom someplace else. That may be the case for adding more restrictions to method name formats, but I've yet to see a compelling argument. (I've read some discussion threads [not here] about proposed changes to Sun's Java(tm), and they often concern *removing* restrictions; the typical response to these requests is that they shouldn't be allowed, because user's can't be trusted with too much freedom. Pretty funny.) > But I should probably write something about its because Ruby aims > to be nice to Java people ;-) Close; it's because Ruby aims to be nice to *all* people. James