Xref: utzoo comp.unix.questions:13077 comp.lang.c:18031 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.unix.questions,comp.lang.c Subject: Re: comma operator: keep away? Message-ID: <10137@smoke.BRL.MIL> Date: 27 Apr 89 04:14:52 GMT 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> <1989Apr26.214622.10697@utzoo.uucp> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 21 In article <1989Apr26.214622.10697@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes: >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. Oh, come on, Henry, what is "common" or "familiar" depends very much on one's experience. There are many common cases of truly horrible coding style, and most of us are familiar with examples of it. That in itself does not make it easier to read, desirable, or anything else along those lines. The best one can say is that familiarity is one positive factor in code readability, but there are many others too. Clear logical structure is probably more important. While I don't recommend unbridled use of comma operators in place of semicolons, neither would I call usage such as while ( norm( x, y, z ) < distance ) ++x, ++y, ++z; "unreadable". It seems to me that it would be perfectly readable to anyone who should be attempting to deal with C code at all. It may even be preferable to adding the extra punctuation that you recommend.