Path: utzoo!attcan!uunet!ogicse!ucsd!hub.ucsb.edu!eiffel!bertrand From: bertrand@eiffel.UUCP (Bertrand Meyer) Newsgroups: comp.object Subject: Re: Void references Message-ID: <460@eiffel.UUCP> Date: 20 Nov 90 06:45:55 GMT References: <1990Nov7.220902.13393@Neon.Stanford.EDU> Organization: Interactive Software Engineering, Santa Barbara CA Lines: 30 From by davis@barbes.ilog.fr (Harley Davis): > "Assertion violation" is a little vague as a type of error. What > doesn't it cover? An assertion violation is a routine precondition that is not satisfied on routine entry, a routine postcondition not satisfied on routine exit, or a class invariant not satisfied in either case. (There are also other cases involving loop invariants and check instructions.) This is discussed in detail in various references (``Object-Oriented Software Construction'', chapter 7; ``Eiffel: The Language'', chapters 12 and 13; ``Programming by Contract''). On the other hand, since I am the author of these references, I am not the best judge of just how ``vague'' they are. > In particular, why can't it include type assertions > (or other static errors normally caught by the perfect compiler) > and void references? If some condition can be expressed as a type constraint and caught statically we don't need assertions to express it. (There was a comment of a similar nature in a recent message by LaPalice@tauto.fr, although I can't find the exact reference.) -- -- Bertrand Meyer bertrand@eiffel.com