Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!waikato.ac.nz!comp.vuw.ac.nz!am.dsir.govt.nz!robert From: robert@am.dsir.govt.nz (Robert Davies) Newsgroups: comp.lang.c++ Subject: Re: Boolean confusion Message-ID: <1991May30.100914.268@am.dsir.govt.nz> Date: 30 May 91 10:09:14 GMT References: <332@nazgul.UUCP> <1991May29.145100.18519@watson.ibm.com> <1991May29.171209.14760@neon.Stanford.EDU> Distribution: comp.lang.c++ Organization: DSIR Applied Mathematics, Wellington, NZ Lines: 18 In article <1991May29.171209.14760@neon.Stanford.EDU> philip@pescadero.stanford.edu writes: ....... >|> C++ should have a >|> standard built-in Boolean type. > >Yes - maybe it would also catch a lot of those annoying hard to >find bugs caused by typing "if (thing = whatever)" instead of >"==". But how many programs would break? I for one would be prepared >to pay the price for the long-term gain, but I generally try to program >as if boolean and int are distinct types, so the price wouldn't be >very high for me. In cases like this where you do need a change that would damage old code why can't you have a pragma to turn on or off an old or new feature? So that old code would still run with the addition of one line to each source file. Robert