Xref: utzoo comp.unix.questions:13062 comp.lang.c:17953 Newsgroups: comp.unix.questions,comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: comma operator: keep away? Message-ID: <1989Apr26.214622.10697@utzoo.uucp> Organization: U of Toronto Zoology References: <10007@smoke.BRL.MIL> <498@lakart.UUCP> <10057@smoke.BRL.MIL> <628@gonzo.UUCP> <28831@ucbvax.BERKELEY.EDU> <1989Apr24.172219.817@utzoo.uucp> <28890@ucbvax.BERKELEY.EDU> Date: Wed, 26 Apr 89 21:46:22 GMT In article <28890@ucbvax.BERKELEY.EDU> jas@ernie.Berkeley.EDU.UUCP (Jim Shankland) writes: >Sigh. Must have been lousy weather in Toronto that morning. No, actually, the Toronto weather's been fine. >We're agreed that a professional programmer should code as clearly >and readably as possible, and that gratuitous cleverness is a bad >thing. My original posting said so. What I consider self-evidently >true, and you consider self-evidently false, is that the comma >construct is sometimes at least as clear as the equivalent compound >statement... As my original posting said, it is a well-established fact, backed by various experiments on things like reading rates, that familiar styles are easier to read. This particular comma construct is uncommon and hence likely to be unfamiliar. QED. There are always unusual cases where the usual style is, for some special reason, less clear than some variant. But these are unusual cases, and should not be taken to indicate acceptable variation in normal code. -- Mars in 1980s: USSR, 2 tries, | Henry Spencer at U of Toronto Zoology 2 failures; USA, 0 tries. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu