Xref: utzoo comp.unix.questions:13030 comp.lang.c:17812 Path: utzoo!mnetor!tmsoft!dptcdc!berner!lethe!geac!jtsv16!uunet!lll-winken!ames!rex!uflorida!novavax!twwells!bill From: bill@twwells.uucp (T. William Wells) Newsgroups: comp.unix.questions,comp.lang.c Subject: Re: comma operator: keep away? Message-ID: <828@twwells.uucp> Date: 19 Apr 89 04:19:27 GMT References: <10007@smoke.BRL.MIL> <498@lakart.UUCP> <10057@smoke.BRL.MIL> <628@gonzo.UUCP> <28831@ucbvax.BERKELEY.EDU> Reply-To: bill@twwells.UUCP (T. William Wells) Organization: None, Ft. Lauderdale Lines: 68 Summary: Expires: Sender: Followup-To: Distribution: Keywords: In article <28831@ucbvax.BERKELEY.EDU> jas@ernie.Berkeley.EDU (Jim Shankland) writes: : I still suggest that a C programmer who understands: : : (A) if (x->in_use) : { : x++; : y++; : } : : but who is mystified by: : : (B) if (x->in_use) : x++, y++; : : had best be investigating alternate career paths. The thing that is wrong with the latter has little to do with mystification. What is wrong is that, for rapid and accurate understanding of code, one should avoid appearing to do more than one thing at a time. In other words, the physical layout of the code should make each thing being done appear distinct from all the other things being done. How often have you been burned by missing the second part of a comma operator? How frequently have you missed the assignment is some idiocy like: foo(