From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f66d11aeda114c52 X-Google-Attributes: gid103376,public X-Google-Thread: fac41,f66d11aeda114c52 X-Google-Attributes: gidfac41,public From: Paul Johnson Subject: Re: Building blocks (Was: Design By Contract) Date: 1997/10/04 Message-ID: #1/1 X-Deja-AN: 277772186 Distribution: world X-NNTP-Posting-Host: treetop.demon.co.uk [158.152.55.135] References: <5v34m5$pl9$1@trumpet.uni-mannheim.de> <34215E3D.77AE@gsfc.nasa.gov> <3421E190.49CC@chimu.com> <3423BE13.9C3852A4@munich.netsurf.de> <01bcc7f6$638b7f60$108142c1@Yeif-1.eiffel.fi> Organization: home Newsgroups: comp.lang.ada,comp.lang.eiffel Date: 1997-10-04T00:00:00+00:00 List-Id: In article , "Robert I. Eachus" writes > Actually Ada does have a quite well defined concept of pre- and >post- conditions for subprograms. However, they are implicit rather >than defined as part of the syntax. This guarentees that the >conditions are always true, but it makes it hard to add complex >postconditions. Yes, sort of. [Positive subrange example deleted] The problem is that it doesn't let you say things like item: T is require not empty > Which is better? I prefer the Ada approach, where you can, with a >little bit of caution, always count on the value of the object meeting >all of the rules for such objects, You can count on it for Eiffel as well: invariants state this kind of thing. Paul. --------------------------------+--------------------------------- Paul Johnson | You are lost in a maze of twisty Email: Paul@treetop.demon.co.uk | little standards, all different. paul.johnson@gecm.com |