[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 15:01:05 -0300
Hallo,
On Tue, Sep 14, 2010 at 2:58 PM, Tomas Guisasola Gorham
<tomas@tecgraf.puc-rio.br> wrote:
> Hi Martin
>
>>> Since Lua is an applicative language both branches would be
>>> evaluated.
>>
>> Whenever that becomes an issue i usually wrap the branches in quotes
>> and evaluate them in the function depending on the condition.
>
> But then you lost access to local values, don't you?
>
He could wrap the branches in closures to be applied inside the
if-then-else function. Ugly, nevertheless.
--
-alex
http://www.artisancoder.com/
- References:
- Re: Ternary operator patch, Henk Boom
- 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
- Re: Ternary operator patch, Alex Queiroz
- Re: Ternary operator patch, Martin Voigt
- Re: Ternary operator patch, Tomas Guisasola Gorham