lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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