case sensitivity

TA7 c08_dta7 at jhunix.HCF.JHU.EDU
Tue Apr 25 07:25:01 AEST 1989


In article <10182 at socslgw.csl.sony.JUNET> diamond at 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.

Making C case sensitive has at least two important advantages:
  1- Compilation is faster because there is no need to map upper case
     characters to lower case characters, or vice-versa.
  2- If the compiler is case insensitive then many Pascal programmers will
     create such horrors as: INT MAIN(INT ARGC, CHAR *ARGV[]) {}

  Also, there is the controvertial advantage: One may have a
constant with the same name as a variable or a function.

I think the main reason for it is the general philosophy of C: You
assume the programmer knows what he is doing. You give him tools that
can be used to create a mess, and assume that the programmer is smart
enough to be able to use this power to create efficient programs. As a
result of this philosophy, there is no comparison between the size or
efficiency of C programs with their Pascal counterparts.

  Mamdouh Maher



More information about the Comp.lang.c mailing list