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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,61e9062c1f23b9d5 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: contracted exceptions Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1181165630.012508.55290@i38g2000prf.googlegroups.com> <19fxsxv1god43$.1pqq8vgfu2itn$.dlg@40tude.net> <1it2vtizha2fi$.jxnoaxmm9sop$.dlg@40tude.net> <12vqux55uf5rn.1u5enj1mh0ubk$.dlg@40tude.net> Date: Sun, 10 Jun 2007 17:20:19 +0200 Message-ID: NNTP-Posting-Date: 10 Jun 2007 17:19:58 CEST NNTP-Posting-Host: 972d2efc.newsspool3.arcor-online.net X-Trace: DXC=Z0Z[GE[cgJQV0Pe9PRnbJ\McF=Q^Z^V3X4Fo<]lROoRQFl8W>\BH3YR\@63>n8SU:TDNcfSJ;bb[UIRnRBaCd On Sun, 10 Jun 2007 12:49:46 +0100, Simon Wright wrote: > "Dmitry A. Kazakov" writes: > >> On Sat, 09 Jun 2007 22:04:24 +0100, Simon Wright wrote: > >>> Also, this check is about a precondition, if the caller violates >>> the precondition she has no right to expect me not to raise >>> unheralded exceptions! >> >> Oh my. "If you don't do that, then I ..." (:-)) >> >> No, if the precondition was violated by the caller, then how this >> caller is supposed to handle the exception it does not know? And why >> would you rely on this handling, provided that it is exactly one who >> first violated the contract? > > How is the callee supposed to handle the contract violation? The whole > program is unsafe. Right, this is why continuation in any form, including raising exceptions, is unsafe. There must be an independent program [a judge] to handle the case. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de