[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Ternary operator patch
- From: Tom N Harris <telliamed@...>
- Date: Sat, 18 Sep 2010 16:21:05 +0000
On 9/16/2010 3:40 AM, Ryota Hirose wrote:
There are two benefits of a ternary operator, I think.
> ...
- The script code and compiled binary is shorter than other notation. So
the code will run fast.
Can you give an example of how the bytecode would be shorter? As far as
I can tell, the same instructions should be generated as using an
explicit if-then-else.
And people think "Other major languages have a ternary operator, but why
Lua not?"
People can think what they like. "Everyone else is doing it" is never a
reasonable argument. And the answer to the question is, "because Lua
isn't other languages."
--
- tom
telliamed@whoopdedo.org
- 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, Tom N Harris
- Re: Ternary operator patch, Ryota Hirose