[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Ternary operator patch
- From: Alex Queiroz <asandroq@...>
- Date: Tue, 14 Sep 2010 13:53:14 -0300
Hallo,
On Tue, Sep 14, 2010 at 1:47 PM, Martin Voigt <voigt.m@googlemail.com> wrote:
> Maybe I'm missing something. What's wrong with using a function for
> the ternary use case?
>
> local value = ternary(condition, value_if_true, value_if_false)
>
Since Lua is an applicative language both branches would be evaluated.
--
-alex
http://www.artisancoder.com/
- 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
- 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