To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.publishOpen lugnet.publish in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Publishing / 348
347  |  349
Subject: 
Case-sensitivity in programming languages
Newsgroups: 
lugnet.publish
Date: 
Wed, 17 Feb 1999 19:24:34 GMT
Viewed: 
1541 times
  
In lugnet.publish, blisses@worldnet.att.net (Steve Bliss) writes:
[...]
I also don't like my programming languages to be case sensitive, for
more-or-less the same reason.  I think it's illogical for a program to
choke on the keyword 'if', but accept 'IF' with no problem.
[...]

Well, one of the reasons many high-level languages are case-sensitive is that
it vastly increases flexibility and expressiveness.  Languages such as Lisp,
Forth, PostScript, Perl, etc. with advanced string manipulation capabilities,
dynamic run-time typing, late binding, etc., all let you define functions and
treat them as if they were built-in language features.  Same goes for operator
and method overloading.  These extension mechanisms, usually using symbol
tables, make use of the same code used for dictionaries (e.g., hashes or
associative arrays).  This is an extremely flexible and powerful paradigm, the
effectiveness of which would be severely hampered by case-insensitivity.
Notwithstanding, a language could certainly employ an uppercasing or
lowercasing filter in the symbol table lookup, but then you'd have to introduce
extra syntax into the grammar to specify when you wanted case-sensitive lookups
and when you wanted case-insensitive lookups.

Anyway, on the surface, it may seem restricting when a language differentiates
between 'if' and 'IF', but if the language has any real extensibility in it,
it would actually be restricting not to differentiate.  Older languages like C,
C++, Pascal, FORTRAN, BASIC, etc., however, don't really benefit much from
case-sensitivity, except maybe for human-readability issues such as macros
conventionally being uppercase in C, so that, say, ASSERT(x) really means
something different from assert(x).

--Todd



Message has 1 Reply:
  Re: Case-sensitivity in programming languages
 
[I suppose this should move to off-topic. Oh well.] (...) If you say so. (...) I'll disagree that it only *seems* restricting *on the surface*. When I read "assert(x)" and "ASSERT(x)", my brain thinks they mean the same thing. I've used systems (...) (25 years ago, 17-Feb-99, to lugnet.publish)

Message is in Reply To:
  Re: Lego Easter Eggs!
 
(...) Is 'Reason' the same word as 'reason'? Filenames aren't just some internal computer identification. They're used by people, and people are not (generally) case-sensitive. Well, they might be case-sensitive if you don't capitalize their name (...) (25 years ago, 17-Feb-99, to lugnet.publish)

58 Messages in This Thread:



















Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR