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/09/17 Message-ID: #1/1 X-Deja-AN: 273409933 References: <5v34m5$pl9$1@trumpet.uni-mannheim.de> Distribution: world X-NNTP-Posting-Host: treetop.demon.co.uk [158.152.55.135] Organization: home Newsgroups: comp.lang.ada,comp.lang.eiffel Date: 1997-09-17T00:00:00+00:00 List-Id: In article <5v34m5$pl9$1@trumpet.uni-mannheim.de>, Marc Wachowitz writes >paul.johnson@gecm.com (Paul Johnson) wrote: >> In fact the Eiffel exception mechanism is superior to the Ada one >> because it is built on a theoretical model of software engineering. > >It is only "superior" if you think that Bertrand Meyer's proposed theory >about exceptions is the only valid one. I don't think it is - and just to >the contrary, I consider something like Eiffel's class EXCEPTION an ugly >hack to differentiate between kinds of exceptions. Which suggests that you are missing the point about DBC. The precise mechanism by which the client distinguishes between exceptions is not important (in fact I rather agree with you about EXCEPTION). What is important is the fact that ignoring an exception is not an option. DBC requires that a class either fulfil its contract or raise an exception. The client class which recieves the exception can either try again a different way or pass the exception on to its client. Simply hiding the failure under the carpet is not an option. The precise nature of the exception is much less important than its existance. Ada allows the programmer to quietly ignore an exception and pretend that a routine succeeded when in fact it failed. This is wrong. 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 |