Re: [Hampshire] Code style

Forside

Besvar denne besked
Skribent: Bob Dunlop
Dato:  
Til: hampshire
Emne: Re: [Hampshire] Code style
Hi,

On Mon, Jun 08 at 02:57, Hugo Mills wrote:
...
>    Yet one more reason to avoid ternary operators... (If you haven't
> guessed yet, I'm not a fan of the whole concept. I've rarely met a use
> of the ternary operator, in any language, that made code easier to
> read.)


So I guess you wouldn't be a fan of the GNU C construct

    something ?: fallback


equivalent of standard C

    something ? something : fallback


providing something has no side effects. No significant advantage that I
can see and a real portability glitch.

Another programmer in the company likes to use it and it really irritates
me.

-- 
        Bob Dunlop