Adriaan van Os wrote:
John L. Ries wrote:
IMHO, case-sensitivity is the single worst feature of both UNIX and C.
But what is "case-sensitive" and "not case-sensitive" ?
Does "not case-sensitive" mean that "theInt" is converted to "THEINT" or "Theint" or "_Theint" ? Then, we back in the middle ages of computing. We are simply ignoring the fact that humans really don't like that (and thus start passionate discussions about it).
In a case-insensitive programming language, one can capitalize (or not) a name however one likes and it won't change the meaning. That is what Fortran, Pascal and other case-insensitive languages do and C, Perl, AWK, etc. don't. How the name is capitalized internally is an implementation detail (nothing wrong with writing a Fortran compiler that uses mixed-case variable names in listings; maybe the first capitalization it sees for each name, which is what one sees in modern Windows directory listings). Even if the names are internally converted to upper or lower case, it doesn't affect the readibility of the code, which is under the control of the programmer. Certainly, Pascal doesn't force you to write everything in upper-case, though you could, if you wanted.
Or, does "case-sensitive" mean that "MyProgram.pas" is listed in a file system as "MyProgram.pas" (not "MYPROGRAM.PAS") but that at the same time a file "myprogram.pas" in the same directory is not allowed ? I would call that a clever design decision. The human sensitive-to-case aspect of it is retained (rather than subordinated to technical considerations) and at the same time the mistakes of UNIX and C are avoided.
That's called display case sensitivity and it's a good thing (semantic case sensitivity, which is what I was discussing, is not). I'll even give the devil his due and credit MS for making it a standard feature of Windows file systems (having imported it from OS/2's HPFS).
While it is true that C has become the Industry Standard (aka the "established religion") and that many newer programming languages copy C's syntax and case sensitivity (to make it easier for C programmers to learn them), this does not mean that the case insensitivity of Pascal, Fortran, BASIC, and the like is an anachronism (ie. a formerly useful feature that has now become a burden); it it still a useful feature because it eliminates a major source of syntax errors and confusion at very low cost. It is unfortunate that the developers of GPC have to spend time writing code to flag case inconsistancy issues; we have only the dominance of C to blame for it.
I think we can lay this discussion to rest at this point.
-------------------------| John L. Ries | Salford Systems | Phone: (619)543-8880 x23 | Cell: (760)445-6122 | -------------------------