lua-users home
lua-l archive

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


Hello Lua Hackers,

I fixed my patch for handling local variables or else.  This patch can compile various codes.  Is this patch OK?

BTW, my opinion of discussions:

Is a ternary operator necessary in Lua?  I think NO for almost Lua programmer.  and/or idiom work fine in almost case.  But, it may cause a bug which is hard to solve.

Which syntax is good for ternary operator?   I think ? : is best, but : is an oeprator for method calling, so lexer will face ambiguity.  if/then/else is better because it has good readability in script, there is no ambiguity, and the PATCH IS SMALL. 

Thank you,
Ryota Hirose

Attachment: lua-ifexpr.diff
Description: Binary data