@property

bearophile bearophileHUGS at lycos.com
Thu Jun 24 14:58:39 PDT 2010


Steven Schveighoffer:
> How about we get rid of case-sensitivity, so people who like to use all  
> caps can have their say in how they call your functions.  Does it make any  
> sense?

Case-insensitive languages make sense. In many natural languages written words usually mean the same thing regardless their case. In the same way, the "hello" word written with a blue pen means the same thing as "hello" written with a red pen. They are the same word. The same is true if you write "HELLO" or "Hello" or "hello", case is seen as the color of text, it doesn't change text meaning.

For people that learn their first programming language I think that a caseless language is simpler to learn, because they need to learn one thing less (that writing "for" and "For" is not the same keyword as in the natural languages they know already).

In practice in Pascal-like languages you don't write with random case like rEpEAT UNtiL, you keep an uniform case, it's a style, like Repeat or repeat in the whole program. Newbie Delphi programmers sometimes switch case in a single program.

Case-insensitive languages are not so bad (more modern languages have invented ways to use the case in structured ways, so if you turn D into a case-insensitive language you will probably have some troubles. To avoid such troubles you need a language that is designed from the start to be case-insensitive).

Bye,
bearophile


More information about the Digitalmars-d mailing list