lua-users home
lua-l archive

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


Eric Tetz wrote:
> --- Edgar Toernig <froese@gmx.de> wrote:
> > IMHO, the additional tokens "then" and "end" only obfuscate the real
> > meaning of the statements.  I would prefer:
> 
> 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 would love to see these superfluous tokens be made optional, given us a
> slightly leaner, Python-esque source.

Hehe, part of Sol's changelog:

>sol 0.61 Thu, 02 Aug 2001 03:17:36 +0200 by froese
>Version-Log:         made 'then' and 'do' optional

But later on I decided that it's a bad idea[1] exactly because that
would prohibit a later change I described in my previous posting.
I.e. if someday I decide that a semicolon is a required statement
terminator I could implement single statement if's, while's, and for's.
But when 'do' and 'then' are already optional you cannot decide any
more whether it's a short or long form.

Ciao, ET.


[1] ... but forgot to undo it.