case sensitivity

Chris Batches? We don't need no steenking batches! Seaman crs at cpsc6b.cpsc6a.att.com
Wed Apr 26 03:23:38 AEST 1989


diamond at diamond.csl.sony.junet (Norman Diamond) writes:
< >jskuskin at eleazar.dartmouth.edu (Jeffrey Kuskin) writes:
< 
< >>    Why is C case-sensitive? ...
< 
< henry at utzoo.uucp (Henry Spencer) writes:
< 
< >Why not?  The real question is why things should be case-*in*sensitive.
< >Uppercase and lowercase are different in appearance and in English usage;
< >why should they be synonymous in a programming language?
< 
< 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.
< 
< >Henry Spencer at U of Toronto Zoology
< 
< Norman Diamond, Sony Computer Science Lab (diamond%csl.sony.jp at relay.cs.net)

As a matter of fact, I WOULD want to have to distinguish identifiers named
myFunc, myfunc, Myfunc, MyFunc, and MYFUNC.  I have done this in the
past, for example, when I typedef a struct to 'NODE', then declare a
variable as 'NODE *node'.  I find this quite easy to read.

People have been saying things such as, "Humans are case-insensitive".
Note my use of 'WOULD' above, as opposed to 'would'.  This is due to the
fact that I intended a stronger, and therefore, different, meaning of the
word.

Humans are case sensitive to the point that a simple change in inflection
can radically alter the meaning of a word or phrase.  Also, we are case
sensitive in that I do take the word 'Tree' to mean something other than
'tree'.  The word 'Tree' would either be a proper name, i.e.  'George,
meet Tree; Tree, meet George', or at least the beginning of a sentence.
The word 'tree' refers to any of the hundreds of varieties of woody
plants, some growing to heights in excess of a hundred feet.

All this aside, C (that's a capital c) IS a case sensitive language, so
if someone wants to use it as a case-insensitive one, then just don't
use the shift key :-).

-- 
Chris Seaman            |    o\  /o
crs at cpsc6a.att.com <or> |      ||         See "Attack of the Killer Smiley"!
..!ihnp4!cpsc6a!crs     |   \vvvvvv/     Coming Soon to a newsgroup near you!
                        |    \____/ 



More information about the Comp.lang.c mailing list