Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond!diamond From: diamond@diamond.csl.sony.junet (Norman Diamond) Newsgroups: comp.lang.eiffel Subject: Re: Eiffel vs. C++ Keywords: Assertions Message-ID: <10367@socslgw.csl.sony.JUNET> Date: 14 Jun 89 07:26:57 GMT References: <807@batserver.cs.uq.oz> <9464@alice.UUCP> Sender: news@csl.sony.JUNET Reply-To: diamond@csl.sony.junet (Norman Diamond) Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan Lines: 19 In article <807@batserver.cs.uq.oz>, bigm@batserver.cs.uq.oz (Michael Pilling [Real people drink purple milk]) drank something purple that wasn't just milk: >> A positive square root should be smaller than the input and >> when squared should give the input. In article <9464@alice.UUCP> ark@alice.UUCP (Andrew Koenig) writes: >Sometimes the code is right and the assertion is wrong. >For example, sqrt(0.25) should be 0.5 This is entirely correct, of course. Nonetheless, suitable use of assertions make it much easier to debug both the assertions and the code, than it is to debug code by itself. -- Norman Diamond, Sony Computer Science Lab (diamond%csl.sony.co.jp@relay.cs.net) The above opinions are my own. However, if you see this at Waterloo, Stanford, or Anterior, then their administrators must have approved of these opinions.