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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: Stephen Leake Subject: Re: Building blocks (Was: Design By Contract) Date: 1997/09/18 Message-ID: <34215E3D.77AE@gsfc.nasa.gov>#1/1 X-Deja-AN: 273573008 References: <5v34m5$pl9$1@trumpet.uni-mannheim.de> Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Reply-To: Stephen.Leake@gsfc.nasa.gov Newsgroups: comp.lang.ada,comp.lang.eiffel Date: 1997-09-18T00:00:00+00:00 List-Id: Paul Johnson wrote: > > Ada allows the programmer to quietly ignore an exception and pretend > that a routine succeeded when in fact it failed. This is wrong. I assume you are talking about: begin ... some code exception when others => null; end; which ignores exceptions. Usually, this is a bad idea. But sometimes, it is essential. Consider the top level loop of a fail-safe system: loop begin Initialize; loop ... do main stuff end loop exception when others => null; end; end loop; This way, no matter what the "main stuff" does, the outer loop will try again if an unhandled exception is raised. Exiting to the "environment" would be less safe. How does Eiffel handle this situation? This is a general philosophy of Ada; provide the tools to do various jobs. Don't force a programmer to do something because it's "good". > > 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 | -- - Stephe