Path: utzoo!mnetor!uunet!mcvax!enea!sommar From: sommar@enea.se (Erland Sommarskog) Newsgroups: comp.lang.misc Subject: Re: case sensitivity Message-ID: <2835@enea.se> Date: 12 Mar 88 11:06:49 GMT References: <2318@bsu-cs.UUCP> Reply-To: sommar@enea.UUCP(Erland Sommarskog) Followup-To: comp.lang.misc Organization: ENEA DATA AB, Sweden Lines: 50 Rahul Dhesi (dhesi@bsu-cs.UUCP) writes: >In Modula-2 reserved words are required to be in uppercase while names >of standard procedures are in mixed case. Thus one must be constantly >using the shift key. This is painful. > >In C reserved words and standard functions are in lowercase. By simply >not using uppercase letters one gets all the advantages of a >case-insensitive language without any hassles. So the argument against using uppercase letters should by the use of the shift key? But then English must be a pain as well. Not talking of any programming language that uses operators like !"#$%&/() for which you need the shift key. More seriously I think the use of mixed key in identifier names is a virtue. Why call something averylongnamewhichyoubarelycannotread when you can call AVeryLongNameWhichIsYetEasyToReadAtFirstGlance? OK, you may use underscores instead of case shifts. However, there is a drawback if the compiler has low limit of significant characters. The good point with having the reserved words in uppercase like in Modula-2 is that they stand out much more and highlights the structure. (Provided of course that you don't use uppercase in your identifiers!) Personally I find to read programs just in lowercase as quite unreadable. I am a little ambvivalent whether against case sensitivity as such, but I tend to be in favour for it. (In languages that is. In a Unix it's pain and nothing else.) The reason is that is quite confusing to see a variable sometime called "Count" and sometimes "count". Did he mean anything by that? Also I recall spending my time to find a bug in the following scenario: Program .... Const WORDLENGTH = 80; (* Which *is* one word in Swedish *) ..... Procedure .... var WordLength : integer; ... If WordLength < 20 then For me "WORDLENGTH" and "WordLength" were two different entities so I couldn't just understand why the machine thought all words were longer than 20 letters. Took quite a while until I realized what happened. Finally on reserved words: Ideally I think they should be accepted in any case, to not bind to the programmer too much to a style he may dislike. And anyway it's quite folly to declare a variable called "else". -- Erland Sommarskog ENEA Data, Stockholm sommar@enea.UUCP "Si tu crois l'amour tabou... Regarde bien, les yeux d'un fou!!!" -- Ange