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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,f66d11aeda114c52 X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,f66d11aeda114c52 X-Google-Attributes: gid103376,public From: "Veli-Pekka Nousiainen" Subject: Re: Building blocks (Was: Design By Contract) Date: 1997/09/23 Message-ID: <01bcc7f6$638b7f60$108142c1@Yeif-1.eiffel.fi>#1/1 X-Deja-AN: 274754360 References: <5v34m5$pl9$1@trumpet.uni-mannheim.de> <34215E3D.77AE@gsfc.nasa.gov> <3421E190.49CC@chimu.com> <3423BE13.9C3852A4@munich.netsurf.de> Organization: AMT Oy Newsgroups: comp.lang.ada,comp.lang.eiffel Date: 1997-09-23T00:00:00+00:00 List-Id: Matthew Heaney wrote in article ... > In article <3423BE13.9C3852A4@munich.netsurf.de>, Joachim Durchholz > wrote: > > > >What's disciplined about Eiffel exceptions is not the retry instruction, > >which is somewhat secondary. The discipline of exception handling in > >Eiffel has other sources: > >- A precise definition of what an exception indicates (namely a routine > >that fails to fulfill its postcondition - other languages, lacking the > >notion of postcondition, can't even start to compete) > > This statement confuses syntax with semantics. By a very deliberate choice > during language design, > there is not always a way in Ada to state syntactically what the > postcondition of a subprogram is (and never any way to state what > exceptions are propagated by a subprogram). However, in Ada, you do state > what the postcondition is, in the form of a comment. It is clearly not the > case that Ada - or any other language - "lacks a notion of postcondition." It is clear to me that postconditioning is missing in all other languages exept Eiffel (Sather???). If all you need is comments, then my old hex-assembler for an 8-bit processor is all O-O with DbC, I just comment :-) > > So yes, in Ada, you really do raise an exception when you are unable to > satisfy a postcondition, it's just that the postcondition and possible > exceptions raised cannot be stated as part of Ada syntax; they must be > stated as a comment. > > IMO -- ------------------------------------------------------------------------- Veli-Pekka Nousiainen Sokinsuontie 3 A 1, FIN-02760 Espoo, Finland TEL +358-9-859 2025 ; GSM 0400-5940 824 e-mail: vp.nousiainen@remove_this_eiffel.fi -------------------------------------------------------------------------