Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!shelby!labrea!sri-unix!trent From: trent@unix.SRI.COM (Ray Trent) Newsgroups: comp.lang.c Subject: Re: Explanation of "Case-sensitive" Message-ID: <30009@sri-unix.SRI.COM> Date: 28 Apr 89 18:41:37 GMT References: <13174@dartvax.Dartmouth.EDU> Reply-To: trent@unix.sri.com (Ray Trent) Distribution: na Organization: SRI, Menlo Park, CA. Lines: 25 In the above article, 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." > >A quick example will clarify: > >In Pascal (a case-insensitive language by my definition), "myVar := 2" >is the same as "mYvAR := 2" And anyone who coded both of these statements in one file (or universe for that matter) should be taken out immediately and shot (unless you care to take the time to properly torture them before execution). Listen and understand: if two objects are the same, they should appear superficially the same, this is called "writing readable code". One way of preventing idiots from using both "mYvAR" and "MyVar" in the same program is to make the language case sensitive. Admittedly, this is less of a problem when comparing "MYVAR" to "myvar" and "Myvar", but what a kludge it would take to allow the latter and not the former. Eris help us (by leaving us alone, please).-- "When you're down, it's a long way up When you're up, it's a long way down It's all the same thing And it's no new tale to tell" ../ray\..