Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!uwm.edu!rutgers!uwvax!umn-d-ub!umn-cs!nis!quad!dts From: dts@quad.uucp (David T. Sandberg) Newsgroups: comp.lang.c Subject: Re: A question of style Message-ID: <369@quad.uucp> Date: 2 Dec 89 12:20:43 GMT References: <1989Dec1.231901.17719@aqdata.uucp> Reply-To: dts@quad.uucp (David T. Sandberg) Organization: Quadric Systems, Richfield MN Lines: 16 In article <1989Dec1.231901.17719@aqdata.uucp> sullivan@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@quad.uucp or ..uunet!rosevax!sialis!quad!dts