A question of style

David T. Sandberg dts at quad.uucp
Sat Dec 2 23:20:43 AEST 1989


In article <1989Dec1.231901.17719 at aqdata.uucp> sullivan at aqdata.uucp (Michael T. Sullivan) writes:
:said I should surround the getchar in parens instead.  Why?  Not because
:the commas weren't proper but because "most programmers did it that way."
:Is that really a good enough reason?  Most C programmers I've encountered
:do not use '?:'.  Is that a good enough reason to not use it?  I think not.

Well, that's fine, as long as you don't mind the people who have to
support your code in your wake putting a bounty on your head for
hiding little surprises like that in your programs.  Personally, I
think that writing code that is as easy and natural as possible for
other people to comprehend and maintain is more than enough of a
reason to avoid excessive usage of commas, etc. where more common
methods will do just as well.

-- 
David Sandberg             dts at quad.uucp or ..uunet!rosevax!sialis!quad!dts



More information about the Comp.lang.c mailing list