Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!smurf!altger!doitcr!de.intel.com!intelhf!ichips!iwarp.intel.com!inews!nevin!bhoughto From: bhoughto@nevin.intel.com (Blair P. Houghton) Newsgroups: comp.lang.c Subject: Re: One more point regarding = and == (more flamage) Message-ID: <3425@inews.intel.com> Date: 24 Mar 91 06:24:27 GMT References: <13603@helios.TAMU.EDU> <3182@inews.intel.com> <632@taumet.com> Sender: news@inews.intel.com Organization: Intel Corp, Chandler, AZ Lines: 34 In article <632@taumet.com> steve@taumet.com (Stephen Clamage) writes: >bhoughto@pima.intel.com (Blair P. Houghton) writes: >>Put [comments] in, and make >>them accurate, and it doesn't matter how much the code obfuscates. Yep. I said "accurate", all right. >The compiler doesn't check comments, and there is never any guarantee >that a comment matches the adjoining code. The compiler doesn't give a doo-doo that you included the explicit compare-not-equal-to-zero, either (modulo optimization). Comments are for humans. I make no apologies for idiots who happen to learn to type program tokens in cc'able order. There's never any guarantee that the code matches the spec, nor any that the spec matches the enhancement request, nor especially any that the enhancement request matches the performance needing improvement. Hey, the real world encroaches. I simply consider /* assign-cum-check */ if ( a=b ) more expressive, readable, correct, and professional than if ( (a=b) != 0 ) --Blair "/* flames to /dev/null */ if ( !dev ) flame_away();"