Xref: utzoo comp.lang.c:17846 comp.lang.misc:2855 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!think!barmar From: barmar@think.COM (Barry Margolin) Newsgroups: comp.lang.c,comp.lang.misc Subject: Re: case sensitivity Message-ID: <39680@think.UUCP> Date: 24 Apr 89 18:49:46 GMT References: <13159@dartvax.Dartmouth.EDU> <1989Apr21.194615.5344@utzoo.uucp> <10182@socslgw.csl.sony.JUNET> Sender: news@think.UUCP Reply-To: barmar@kulla.think.com.UUCP (Barry Margolin) Followup-To: comp.lang.misc Organization: Thinking Machines Corporation, Cambridge, MA Lines: 38 This discussion is losing its specificity to C, so I've directed followups to comp.lang.misc. In article <10182@socslgw.csl.sony.JUNET> diamond@csl.sony.junet (Norman Diamond) writes: >Come on Henry, you wouldn't want to have to distinguish identifiers named >myFunc and myfunc, when reading someone else's code. If you don't want to >have myFunc map onto myfunc (i.e. not be synonymous) then suggest a require- >ment that all occurences of an identifier be consistent in case, but it is >silly to permit two distinct identifiers to differ only in case. So long as such things are not used haphazardly, case differences can be useful. For instance, in a language that doesn't permit some kind of delimiter (e.g. underscores or hyphens) in identifiers, it's possible that there could be two procedures named ReAdjustOneToken and ReadJustOneToken (I know, I'm stretching); case is being used as a delimiter, and it's completely obvious which one is which (but readjustonetoken would be a poor name for either). At a previous place of employment, case distinctions were often part of some developers' or groups' programming conventions. For instance, parameters to top-level procedures might be named P_xxx, while parameters to internal procedures would be named p_xxx. Another group used uppercase prefixes and suffixes to indicate data type; e.g. fooP would be a pointer to a foo (we used PL/I, which doesn't have typed pointers), but foop would be something else (and foopP would be a pointer to a foop). I've used both case-sensitive languages and case-insensitive languages. They both have their advantages and disadvantages. Case distinction, if used carefully, can be a good tool. It's easy to ignore when you aren't concerned about the attribute it represents, and easy to notice when you are. Barry Margolin Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar