lua-users home
lua-l archive

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


Peter Hill wrote:
> Waiting for Lua 5.1 is certainly fine by me... Lua 5.0 being a "beta".
> 
> And the change is not exactly earth-shattering. Rather, it is merely a fine
> tuning of the syntax... ironing out quirky irregularities... aiming for a
> more homogenous, regular & simple syntax [ie, easily understood].

Yes, but why wait?

/snip
> As far as homogenising changes go, I'd move all atomic items (not just
> "function") out of "exp" and into "prefixexp" where they belong. Why, you
> ask? "123()" hardly seems meaningful, let's just outlaw it and we don't have
> to worry about numbers acting as functions. However, since Lua is not
> statically typed, since "a()" is syntactically valid, and since "a" can be a
> number (or literal string, or function closure, or nil / true / false) then
> such a contruct is indeed valid up to evaluation time (and is potentially
> trapped). So why generate two different errors for the same action?
/snip 

Interesting. Could you or anyone else modify the existing parser 
to accept your definition of the syntax, so we could test the effects? 

-- 
"No one knows true heroes, for they speak not of their greatness." -- 
Daniel Remar.
Björn De Meyer 
bjorn.demeyer@pandora.be