[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Ternary operator patch
- From: Javier Guerra Giraldez <javier@...>
- Date: Tue, 14 Sep 2010 14:00:31 -0500
On Tue, Sep 14, 2010 at 1:37 PM, Carlos Costa <ccosta@bsd.com.br> wrote:
> An expression of type "x ? y : z" where "y" is not a false value
the point is that the condition "where "y" is not a false value" seems
to scare a lot of people.
In my case, i use that idiom mostly when y and z are either constants
or simple expressions. if they involve table lookups or function
calls, it's safer to use if/then/else
--
Javier
- References:
- Re: Ternary operator patch, Henk Boom
- 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, David Kastrup
- Re: Ternary operator patch, Miles Bader
- Re: Ternary operator patch, David Kastrup
- Re: Ternary operator patch, Mark Hamburg
- Re: Ternary operator patch, Martin Voigt
- Re: Ternary operator patch, Alex Queiroz
- Re: Ternary operator patch, Martin Voigt
- Re: Ternary operator patch, Paul Hudson
- Re: Ternary operator patch, Pierre Chapuis
- Re: Ternary operator patch, Carlos Costa