in reply to An alternative to ?: notation

apart from a missing comma my first reaction to your 'concise' version is ouch, followed by wince, then yeuck.
Personally i think the ternary method gives a lot more in readability than it loses in verbosity and is probably easier to maintain in the long run. Just my $0.02.

Replies are listed 'Best First'.
RE (2): An alternative to ?: notation
by tilly (Archbishop) on Aug 09, 2000 at 19:08 UTC
    You are right, of course. The ternary method is both a standard recognizable construct and should be faster. (No temporary array to build and destroy.) I certainly would not recommend switching.

    OTOH I appreciated princepawn's suggestion for the amusement value. Sometimes you just need to put a joke in your code for sanity's sake, and I might use this someday for just that purpose... :-)