Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!dogie.macc.wisc.edu!uwvax!rutgers!att!ihlpb!tainter From: tainter@ihlpb.ATT.COM (Tainter) Newsgroups: comp.lang.c Subject: Re: Explanation of "Case-sensitive" Message-ID: <10296@ihlpb.ATT.COM> Date: 23 Apr 89 19:36:18 GMT References: <13174@dartvax.Dartmouth.EDU> Reply-To: tainter@ihlpb.UUCP (55529-Tainter,J.A.) Distribution: na Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 30 In article <13174@dartvax.Dartmouth.EDU> jskuskin@eleazar.dartmouth.edu (Jeffrey Kuskin) writes: >What I *DID* mean is: "Why does the C language specify that keywords, >identifiers, etc. be distinguished by case as well as by spelling." >Why was C specified this way? A case-insensitive language puts no >restrictions on source-file formatting: symbolic constants can be >all upper case, variables all lower case, functions mixed-case, etc. >The only difference comes at compile time when silly errors (IMHO) >such as "mYvAR not declared" start to appear (when you *have* declared >"myVar"). But you haven't! Compiling is exactly when you want to find these! Every instance of this indicates a poorly understood piece of code and a bug waiting to bite you. Do you also recommend using Thisisasymbolofgreatlength and Thisisasymbol and expect them to be equal just because your compiler truncates symbols? To return to your argument: Consider the fact that we capitalize the first letter of sentences (in English, sorry all you other native language speakers). Why? Because there is additional information important to the understanding of the statement which we wish to convey. The same is true with programming languages. I contend that "Why?" and "why?" are not the same. The first is a quoted question, the latter is just a quoted question fragment. That additional information is critical. Just as the use of case in your programming should be. >-- Jeff Kuskin, Dartmouth College --johnathan.a.tainter-- att!ihlpb!tainter