lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

----- Original Message ----- 
From: "John Passaniti" <>
To: "Multiple recipients of list" <>
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

Opposed to:

if (!exiting)

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)