Re: [Hampshire] Code style

Top Page

Reply to this message
Author: Vic
Date:  
To: hampshire
Subject: Re: [Hampshire] Code style

> 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.)


They can be very useful :

ArrayStart = StartsWithZero ? 0 : 1 ;

Or even :

#define min(a, b) ((a<b) ? a : b )

But, as with so many things, ternary operators are easily abused.

The solution, IMHO, is to educate your programmers. Sadly, most people
seem to want to alter languages instead :-(

Vic.