[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Ternary operator patch
- From: David Kastrup <dak@...>
- Date: Mon, 13 Sep 2010 09:53:50 +0200
Ryota Hirose <hirose.ryota@gmail.com> writes:
> Thank you for Doug, and other Lua Hackers.
>
> At first, I found that my patch is not complete. It will mis-compile
> the code with local variable. My patch will compile following code as
> returns always 'a'. Could someone please correct my mistake, or don't
> use my patch.
>
> function f(a)
> return if a then g(a) else a
> end
>
> One of the reason I want to add 'real' ternary operator is to make
> convenience for the old C programmers. They always complain that Lua
> lacks blah blah.
C programmers complaining about lacking blah blah are what lead to C++.
--
David Kastrup
- 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