[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Ternary operator patch
- From: "Joseph Manning" <manning@...>
- Date: Sun, 12 Sep 2010 16:30:00 +0100 (IST)
On Sun, September 12, 2010 15:52, Pierre Chapuis wrote:
>> Apparently nobody has it yet, I find it strange. Why not the
classical:
>>
>> a = b ? x : y
Pierre,
I like this, it's very compact, and the '?' is quite suggestive of
the meaning.
However, the ':' symbol is already used by Lua, so cannot be used
here.
Perhaps replace ':' by '!', as in
a = b ? x ! y
since '!' is currently unused, and ( at least in the C / Java world
) means 'not',
which is similar to the 'else' interpretation of ':'.
Joseph Manning / Computer Science / University College Cork / Ireland
- 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
- Re: Ternary operator patch, Duncan Cross
- Re: Ternary operator patch, Eric Man
- Re: Ternary operator patch, Pierre Chapuis