On Jan 6, 2012, at 1:07 AM, Charlie Carothers wrote:
I absolutely loathe "OK, if I knew for sure the
ternary was faster, I might grudgingly use it in an interrupt routine but I would not be
really happy about it!
I actually like the ternary statement and think it reads a lot clearer, as long as
it's simple conditions (e.g. "foo = bar ? baz : NULL;" or the like,
certainly nothing that needs to occupy more than one line; I even start to get nervous
when parentheses get involved). However, I've found that a lot of people who are
otherwise quite good programmers are totally unfamiliar with it, so I tend to avoid using
it in anything I'll have to share.
- Dave