Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!hplabs!hplabsz!sartin From: sartin@hplabsz.HPL.HP.COM (Rob Sartin) Newsgroups: comp.lang.c++ Subject: Re: Time to standardize "true" and "false" Message-ID: <4031@hplabsz.HPL.HP.COM> Date: 26 Sep 89 19:25:05 GMT References: <13730@well.UUCP> <9464@attctc.Dallas.TX.US> <2142@dataio.Data-IO.COM>Reply-To: sartin@hplabsz.UUCP (Rob Sartin) Distribution: comp Organization: Hewlett-Packard, Software Technology Lab Lines: 23 In article dld@F.GP.CS.CMU.EDU (David Detlefs) writes: >I think this might result in measurably safer programs. Just think, >errors of the form > > if (i = 0) ... > >would become errors. (I'm assuming that there is no implicit >conversion between int and boolean.) and all of the programs of the form: SomeType *Current; while (Current = Foo.Next()) { // Do something with Current } would suddenly become illegal even though that is a common idiom for traversing lists. Rob Sartin internet: sartin@hplabs.hp.com Software Technology Lab uucp : hplabs!sartin Hewlett-Packard voice : (415) 857-7592