Article View: comp.lang.eiffel
Article #1613Coping with failure
From: Howard Betel
Date: Wed, 28 Feb 1990 06:09
Date: Wed, 28 Feb 1990 06:09
34 lines
1962 bytes
1962 bytes
I'm an undergrad who is taking a 4'th year MIS course. Our text for the
course is OBJECT-ORIENTED SOFTWARE CONSTRUCTION by Betrand Meyer. The
way the course is working is that each person gives an approximately
1.5 hour seminar on part of a chapter. Mine was 7.9 to the end of the
chapter. I had a question from the class that I wasn't sure of the
answer, so here goes.
Meyer states on page 168 (7.10.3)
"Another way to express the same remark is to say that an operation
may only succeed or fail; there is no middle ground. (Trivial as
this comment may seem, it is not satisfied by the exception
mechanisms of such languages as ADA, CLU or PL/I, which make
it possible to exit from a routine without achieving the routine's
intent, and without signalling failure to the caller."
Now I really do understand the importance of this (and the logic) however
since the assertion defaults are:
"NO_ASSERTION_CHECK (Y):
PRECONDITIONS (Y): ALL
ALL_ASSERTIONS (Y):"
doesn't this allow failures? If a function is executing and the
postconditions are not met, it is possible for a function to complete
with a failure and the client not know that this occured. Not only
does this seem possible, it seems probable considering that by default
postconditions are not checked.
Any answers?
--
Howard Betel Howard@maccs.dcss.McMaster.CA
Dept of Computer Science ...!unet!utai!utgpu!maccs!howard
McMaster University
Technical Details
Message-ID:
<25EB6B0D.2249@maccs.dcss.mcmaster.ca>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!helios.physics.utoronto.ca!ists!yunexus!maccs!howardShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!helios.physics.utoronto.ca!ists!yunexus!maccs!howard From: howard@maccs.dcss.mcmaster.ca (Howard Betel) Newsgroups: comp.lang.eiffel Subject: Coping with failure Message-ID: <25EB6B0D.2249@maccs.dcss.mcmaster.ca> Date: 28 Feb 90 06:09:16 GMT Reply-To: howard@maccs.dcss.mcmaster.ca (Howard Betel) Organization: McMaster University, Hamilton, Ontario Lines: 34