"while/else" (ugh) (was Re: [oclug] Ruby)
David F. Skoll
dfs at roaringpenguin.com
Fri Jun 27 15:46:47 EDT 2003
On Fri, 27 Jun 2003, Michael P. Soulier wrote:
> > Anyone can understand that, but hardly anyone understood the "else"
> > thing.
> Perhaps, but I doubt it's the only programming construct that few
> people understand when they see it for the first time.
> How about upvar in Tcl? Pointers in C? Just about anything in C++?
"upvar" is not an English word, so when you see it, you know something
magical is going on and you read the manual.
Likewise, pointers in C don't have an English equivalent, so you consult
a C reference manual.
C++ is a thoroughly disgusting language, so I won't comment on it. :-)
The point is that "else" is a perfectly good English word, and using
it in a way totally unrelated to its English meaning is a big mistake.
Imagine a language where you would write an abs() function like this:
sub abs (x) {
for (x >= 0) {
putback x;
} notfor {
putback -x;
}
}
Ouch!
--
David.
More information about the OCLUG
mailing list