home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / cplus / 12948 < prev    next >
Encoding:
Internet Message Format  |  1992-08-26  |  1.3 KB

  1. Path: sparky!uunet!sun-barr!cs.utexas.edu!devnull!rgp
  2. From: rgp@mpd.tandem.com (Ramon Pantin)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Tiny proposal for named loops.
  5. Message-ID: <2319@devnull.mpd.tandem.com>
  6. Date: 27 Aug 92 03:56:12 GMT
  7. References: <rmartin.714750452@thor> <9223902.3230@mulga.cs.mu.OZ.AU> <rmartin.714863856@thor>
  8. Sender: news@devnull.mpd.tandem.com
  9. Organization: Tandem Computers, Micro-Products Division
  10. Lines: 31
  11.  
  12. In article <rmartin.714863856@thor> rmartin@thor.Rational.COM (Bob Martin) writes:
  13. >Again, I disagree.  I find this construct:
  14. >   while (error == NO && done == NO)
  15. >easier to understand than:
  16. >   ...
  17.  
  18. (Don't mean to start another religious war :-)
  19.  
  20. I find this verbose and hard to read:
  21.     while (error == NO && done == NO)
  22. Thought process when I see this:
  23.     "while error is equal to NO (what the heck is `NO'?)
  24.     and done is equal to the same `NO'"
  25.  
  26. What is wrong with good old C code as the goods meant it to be?
  27.     while (!error && !done)
  28. Thought process when I see this:
  29.     "while not error and not done"
  30.  
  31. You don't believe in boolean expressions either?  :-)
  32.  
  33. The same can be said for:
  34.     if (flag & XXX)
  35. which is easier to understand than:
  36.     if ((flag & XXX) != 0)
  37. Don't you find this kind of verbosity incredibly ugly ?
  38.  
  39. I'll be sure that the "end is near" when I see:  :-)
  40.     if (((flag & XXX) != 0) == TRUE)
  41.  
  42. Ramon Pantin
  43.