else if

Mark S. Miller markm@erights.org
Thu, 15 Oct 1998 00:58:10 -0700


At 02:15 AM 10/15/98 -0400, Tyler Close wrote:
>If I understand the E grammar correctly, braces must always be used in if /
>else constructs unless the else clause is another if expression. If you
>want to do this, I think it would be better to make elseif (no space) a
>keyword. Just seems more uniform to me that way.

I agree that it's more uniform, but Java-trained eyes will parse "else if"
without thinking.


At 08:48 PM 10/14/98 -0400, Tyler Close wrote:
>Forget all this containsKey nonsense. Don't steal design flaws from Java.

If I stopped stealing design flaws from Java, I have no doubt I could
design a better language.  But it wouldn't be E.  

Bjarne Stroustroup's book "The Design and Evolution of C++" was a
revelation to me -- as a computer scientist, he doesn't like C++ either.
His fantasy language is "Algol-68 with Simula classes".  While not quite my
cup of tea, this does show excellent taste.  His tale of C++ shows that its
horrors were created knowingly and on purpose, in a real-time adaptive
process of riding the complex sociology of language adoption.  If the
sociology or the timing had been different, the language design would have
been different.  There were dozens, maybe hundreds, of object languages
more elegant than C++ -- indeed, there may not be any that are less.  But
C++ was the first bridge that zillions of C programmers actually crossed
into the land of objects.  The Java's tale will probably never be so
honestly told, but it's similar.

I neither have Bjarne's skills at reading the likely sociology of my
audience, nor his degree of willingness to compromise with crap, so E is
probably already doomed.  In any case, it is helpful to push me towards
accepting less crap from Java, but don't be surprised when I push back.


Btw, I like your point about negative indices.  It fits well with Poka-Yoke
"http://www.campbell.berry.edu/faculty/jgrout/", an important E design
heuristic.  Also, as I'm sure you'll appreciate, Java programmers expect
negative indices to be rejected as well. ;)