[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Ternary operator patch
- From: Ryota Hirose <hirose.ryota@...>
- Date: Tue, 14 Sep 2010 18:09:23 +0900
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
- References:
- Re: Ternary operator patch, Henk Boom
- Re: Ternary operator patch, steve donovan
- Re: Ternary operator patch, Geoff Leyland
- Re: Ternary operator patch, steve donovan
- Re: Ternary operator patch, Miles Bader
- Re: Ternary operator patch, David Kastrup
- Re: Ternary operator patch, Miles Bader
- Re: Ternary operator patch, David Kastrup
- Re: Ternary operator patch, Jonathan Castello
- Re: Ternary operator patch, Roberto Ierusalimschy
- Re: Ternary operator patch, Enrico Tassi
- Re: Ternary operator patch, Doug Rogers
- Re: Ternary operator patch, Ryota Hirose