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