|New Book: The School of Niklaus Wirth firstname.lastname@example.org (2000-10-31)|
|Re: New Book: The School of Niklaus Wirth email@example.com (Sebastian Moleski) (2000-11-01)|
|Re: Re: New Book: The School of Niklaus Wirth firstname.lastname@example.org (Mikael Lyngvig) (2000-11-04)|
|Re: Re: New Book: The School of Niklaus Wirth email@example.com (Michael Lee Finney) (2000-11-05)|
|Re: Re: New Book: The School of Niklaus Wirth firstname.lastname@example.org (Orlando Llanes) (2000-11-05)|
|Re: Re: New Book: The School of Niklaus Wirth email@example.com (2000-11-07)|
|Re: Re: New Book: The School of Niklaus Wirth firstname.lastname@example.org (Jean Pariseau) (2000-11-07)|
|Re: Re: New Book: The School of Niklaus Wirth email@example.com (David Thompson) (2000-11-11)|
|Re: New Book: The School of Niklaus Wirth firstname.lastname@example.org (Laurent Guerby) (2000-11-14)|
|From:||Michael Lee Finney <email@example.com>|
|Date:||5 Nov 2000 20:50:36 -0500|
|Organization:||Road Runner High Speed Online -- Northeast Ohio|
|References:||00-10-227 00-11-019 00-11-024|
> It could just be a simple question of "being able to adopt to customer
> Case-sensitivity, in file names and programming languages, is
> basically a very strange and illogical thing since humans tend to
> recognize names that differ solely in case without problems
> ("seBAStian mOLEski" would probably work, if I wanted to get in touch
> with you. Also, you would probably be annoyed if your neighboor
> changed his name to "SebastiAn Moleski" claiming that the name had
> nothing to do with your name).
> The fact that ill-designed languages such as C++, and C to a certain
> degree, have indoctrinated programmers to think case-sensitively
> should not be blamed upon Mr. Wirth.
> Imagine that your mails, delivered via postal service, starts to
> bounce because you'd accidentally written "main Street" rather than
> "Main Street" (or the postal worker thinks you've written "main"
> rather than "Main")...
> Case-insensitivity IS the simple solution. You don't have to worry
> about case. I don't have to worry about case. We can spend our time
> being productive instead...
The problem with case insensitivity is that when multiple words are
compounded to form a single word, the result can be ambiguous without
word markers. The larger the vocabulary, the more probably that
catenation of two words is ambiguous. There are essentially two ways
to achieve word markers...case sensitivity using case changes at the
start of words and word separators such as underscores.
The latter technique works, but many find it a very poor
solution. When I worked in the mainframe world everything was upper
case and underscores (or hyphens) were the usual technique. When I
first started using PCs and had both lower and upper case available, I
found that I still used underscores and that I didn't like case
changes. As time went by, that attitude gradually changed and now I
find that I virtually detest code written using underscores.
Not everyone has the same preferences in this regard, but still I
think that case sensitivity is a very reasonable thing for programming
languages. Which is not to say that it is reasonable in other arenas
such as postal addresses.
As examples, here are some words taken from real programs where word
catenation is ambiguous (and where I had to explicitly handle the
ambiguity for an automated transformation I was doing)...
itemspacing --> item spacing vs. items pacing
menuselect --> menu select vs. menus elect
nodeemphasize --> no deemphasize vs. node emphasize
notequal --> not equal vs. note qual
notext --> no text vs. not ext
tabstop --> tab stop vs. tabs top
topage --> to page vs. top age
I run across this problem on a regular basis -- especially when naming
classes and then using the class name as the base file name (with
.cpp/.hpp/.ipp extensions). I get burned by NT (and OS/2) not being
case sensitive on a regular basis.
As far as noone being flawless is concerned, I consider Niklaus Wirth
to be the worst thing to happen to computer language design, possibly
ever. He has emphasized simple, small languages to such an extent that
languages with power and flexibility have almost disappeared. It
simply is not natural from a cognitive standpoint to only have one way
to think or to do things.
Semantic richness is far more important than minimizing the size of
the compiler -- the latter goal simply is not of interest to me at
all. I consider PASCAL and Wirth's successive languages (including
ADA) to be the worst languages on Earth (and, at one time, I did have
to use some of them for quite some time <shudder>).
One additional observation regarding naming issues. Acronyms in
normal language usage are spelled with all upper case. Proper nouns
are spelled with leading upper case letters (title case) and improper
nouns are spelled with all lower case. This is a clear use of case
sensitivity in natural language that far predated computer programming
languages. So case sensitivity is not some weird approach dreamed up
by some recalcitrant computer language designer. It is a natural
extension of existing language usage.
Also, acronyms are all upper case until they come into common usage
and then become all lower case. However, here I believe that good
naming policies for computer programs differ from that of natural
language. Since the invention of an acronym in the computer field
essentially results in its immediate common usage (even if only within
a set of source files), I believe that acronyms should not be treated
differently than other words in computer programs. Even where the same
acronym would still be upper case when used in natural language.
ASCII is a perfect example of that. It is still upper case in natural
language because it is not in widespread use -- except in the computer
field where it is extremely common. In that field it should be (IMHO)
"ascii" instead of "ASCII", and especially inside a computer program
where the term is used.
Return to the
Search the comp.compilers archives again.