Explanation of "Case-sensitive"

Tainter tainter at ihlpb.ATT.COM
Mon Apr 24 05:36:18 AEST 1989


In article <13174 at dartvax.Dartmouth.EDU> jskuskin at 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



More information about the Comp.lang.c mailing list