Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!mcvax!hp4nl!botter!star.cs.vu.nl!roemer From: roemer@cs.vu.nl (Roemer Lievaart) Newsgroups: comp.lang.c Subject: Re: comma operator Message-ID: <2963@solo6.cs.vu.nl> Date: 1 Aug 89 21:20:46 GMT References: <10099@mpx2.mpx.com> <93@microsoft.UUCP> <10100@mpx2.mpx.com> <10562@smoke.BRL.MIL> <1989Jul24.194646.3012@nc386.uucp> <5630@pt.cs.cmu.edu> <1989Jul28.174033.12734@jarvis.csri.toronto.edu> <918@helios.toronto.edu> <13184@bloom-beacon.MIT.EDU> Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 22 tada@athena.mit.edu (Michael Zehr) writes: >If you debate the "harder to read" bit, consider this -- the comma >essentially is like putting two statements on one line. would you >rather read code like: > puts("it broke."); exit(2); >than: > puts("it broke."); > exit(2); I often write: if (something_goes(wrong) ) fprintf(stderr, "%s: I give up!\n", argv[0] ) , exit(2) ; Of course it's no better than using { ; }, but it's not worse either. ____________________________________________________________________________ Roemer B. Lievaart | Some people are convinced by large gestures, but Amsterdam, Holland | get suspicious by arguments. roemer@cs.vu.nl | -- Nietzsche