Path: news.daimi.aau.dk!olevi From: olevi@daimi.aau.dk (Ole Villumsen) Newsgroups: comp.lang.beta Subject: Case sensitive identifiers (was Re: Why can't we have ... ?) Date: 26 Sep 1994 15:56:04 GMT Organization: DAIMI, Computer Science Dept. at Aarhus University Lines: 76 Message-ID: <366quk$htf@belfort.daimi.aau.dk> References: <35j8ki$3ld@engnews2.Eng.Sun.COM> <35pc42$5ui@belfort.daimi.aau.dk> NNTP-Posting-Host: angers.daimi.aau.dk S|ren Pingel Dalsgaard writes: >I Like case sensitivity too, but perhaps a BETA compiler option would warn the >user if a symbol is used with different capitalizations. Thus room and Room >would be the same symbol but generate a warning if beta is invoked with >--warn-if-wrong-capitalization. > >How about that for a change? That's exactly what I think we need. Or, if we can't have that, a separate case checker program. Gisle Aas writes: > room: @Room; (* instead of "theRoom", "aRoom" or something *) I find this use of capitalisation extremely confusing. I like that the compiler prohibits it. It should at least warn against it. It's *very* hard to pinpoint the error in your program once you have written R while you meant r, and both are declared variables. Gisle Aas also writes: >One thing is that it forces the programmer to write identifiers the >same way. "TempMemory", "tempmemory", and "TEMPMEMORY" look very >different. It is also easier for external programming tools to handle >identifiers that look exactly alike. A *warning* could help me. Even an error message and termination might be better than nothing if I write the same identifier in different ways. But why would we want to be that strict? (If the writer of a library uses a stupid capitalisation in his/her interface, I'd like to be allowed to use my own. But that's a minor point.) Kai Petzke writes: >olm@Eng.Sun.COM (Ole Lehrmann Madsen) writes: ... >>I personally find case sensitive identifiers to be a nuisance, >>but if most people prefer identifiers to be case sensitive, it is easy >>to change the compiler! > >Make it an compiler option at least. Please don't. A compiler option would mean, when I receive a program that Kai has written and try to compile it, I will get error messages and even type conflicts or erroneously behaving programs, and it will be extremely difficult for me to detect that it's because Kai used to compile the same program with the case sensitive switch on, which I never use. Or, as Kurt Guntheroth put it: >Case sensitive identifiers should not be a compiler option, because it will >lead to incompatible BETA programs. Charles (Froggy) Fiterman writes: >I would like a spell checker that would know about >things like Hungarian notation underscores etc that >would spell check my programs. A good convention >would be to use only valid words and their combinations. I agree that would be nice. But it would work nicely with the current compiler. >But folding cases reduces name space to no purpose. 1. How big of a name space do you want? :-) 2. It's for the purpose of avoiding confusion. Ole P.S. Was I too subtle? Beta's name space is infinitely large. After adding case sensitivity, it would still be infinitely large, i.e. same size. Folding cases does not reduce name space.