[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Ternary operator patch
- From: Pierre Chapuis <catwell@...>
- Date: Tue, 14 Sep 2010 20:19:23 +0200
"Paul Hudson" <phudson@pobox.com> a écrit :
>Yuk. Just use if/then/else, in that case.
I also don't like evaluating code but if/then/else has scoping problems. Here's a solution that works but is still not elegant:
a = (function(b) if b then return x else return y end end)(b)
--
Pierre Chapuis
- References:
- Re: Ternary operator patch, Henk Boom
- 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
- Re: Ternary operator patch, Ryota Hirose
- Re: Ternary operator patch, David Kastrup
- Re: Ternary operator patch, Miles Bader
- Re: Ternary operator patch, David Kastrup
- Re: Ternary operator patch, Mark Hamburg
- Re: Ternary operator patch, Martin Voigt
- Re: Ternary operator patch, Alex Queiroz
- Re: Ternary operator patch, Martin Voigt
- Re: Ternary operator patch, Paul Hudson