[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: syntax likes and dislikes (RE: Evaluating LUA)
- From: "Kelmar K. Firesun" <kfiresun@...>
- Date: Mon, 12 Aug 2002 16:26:19 -0500
----- Original Message -----
From: "John Passaniti" <email@example.com>
To: "Multiple recipients of list" <firstname.lastname@example.org>
Sent: Monday, August 12, 2002 3:09 PM
Subject: RE: syntax likes and dislikes (RE: Evaluating LUA)
> > Well, 'end' is hard to get rid of, but 'then'
> > is already totally unneeded by the compiler.
> > It could be made optional by tweaking one line
> > of code, with zero side effects. Same goes for
> > the "do" following "for" and "while" loops,
> > totally unneeded.
> I had always just assumed that 'DO' and 'THEN' were necessary because of
> some ambiguity regarding parsing the conditional expression prior to it.
> But after reading your message, I looked deeper and found that DO and
> THEN do indeed seem superfluous.
] ... SNIP ... [
I've always had the mind set that the "IF test THEN action END"
statements were not only chosen because they reduce compiling and
parsing ambiguities, but also because they are clearer for new
programmers whats going on then a slightly more cryptic C like
syntax "IF (test) action"
With the current syntax you can almost form statements that read
much like an English sentence:
if not exiting then
Certainly the C syntax has its advantages, less typing comes to mind,
but isn't Lua supposed to be designed for non-programmers as well?
Kelmar K. Firesun (IRL: Bryce Simonds)