home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / cplus / 11672 < prev    next >
Encoding:
Internet Message Format  |  1992-07-28  |  1.2 KB

  1. Path: sparky!uunet!cs.utexas.edu!news-is-not-mail
  2. From: russw@cs.utexas.edu (Russ Williams)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: New C++ type: boole
  5. Date: 28 Jul 1992 13:38:51 -0500
  6. Organization: Great Northern Hotel
  7. Lines: 16
  8. Message-ID: <15447rINN533@cs.utexas.edu>
  9. References: <DOUGM.92Jul26151240@titan.cs.rice.edu> <9220912.7004@mulga.cs.mu.OZ.AU> <n2lm22_.nagle@netcom.com>
  10. NNTP-Posting-Host: cs.utexas.edu
  11.  
  12. The proposal seems ill-considered, e.g., lack of concern for what it does
  13. to the standard library.  Plus the misunderstanding that ++ was being used
  14. for logical negation when in the SUN code example given (& every other
  15. such example I've seen) ++ is used for "= true"... this doesn't inspire
  16. confidence...
  17.  
  18. I'd love to have strict boolean types; I once had a subtle bug involving
  19. passing a pointer to a boolean to a function which was to check the bool
  20. value and possible change it... I checked the pointer p instead of *p,
  21. but since that was syntactically legal, I got no warning, and it took a
  22. long time to track down this typo bug.  But I must agree with the people
  23. who point out that much existing code uses this feature, even if my code
  24. does not, and so I think a strict boolean type would break much existing
  25. code.
  26.  
  27. Russ
  28.