[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Ternary operator patch
- From: Duncan Cross <duncan.cross@...>
- Date: Sat, 11 Sep 2010 11:04:39 +0100
On Sat, Sep 11, 2010 at 7:18 AM, Alexander Gladysh <agladysh@gmail.com> wrote:
> Do we *really* need a ternary operator in Lua?
Well, there are already plenty of things already in the language that
we don't *really* need:
- a:b()
- repeat <x> until y
- Multiple return values
- The operators <, <= and ~=
...and so on. If we didn't have these we could always find ways to
work around them. But the workarounds would have pitfalls, just as "a
and b or c" does, and would make Lua code that bit less pleasant to
write. As simple and slender as Lua is, it is not aggressively so, to
the point that absolutely nothing nonessential is allowed in.
-Duncan
- References:
- Re: Ternary operator patch, steve donovan
- 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, Alexander Gladysh