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,99e73f65ea2533b9 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: and then... (a curiosity) Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <18b41828-bda4-4484-8884-ad62ce1c831d@f36g2000hsa.googlegroups.com> <57qdnfULQ9tzKCHVnZ2dnUVZ_tHinZ2d@comcast.com> <48bd0003$1@news.post.ch> <48bf90bf$0$30032$dbd4d001@news.euronet.nl> <48bffbb7$0$74166$dbd49001@news.euronet.nl> Date: Thu, 4 Sep 2008 17:42:04 +0200 Message-ID: NNTP-Posting-Date: 04 Sep 2008 17:42:04 CEST NNTP-Posting-Host: 3f692e63.newsspool1.arcor-online.net X-Trace: DXC=i38gFGbEk_;_A0jCfgHO6>ic==]BZ:af>4Fo<]lROoR14nDHegD_]R5;`;TRZ1>145DNcfSJ;bb[5FCTGGVUmh?4LK[5LiR>kg2`XRnB;nbBo3 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:7645 Date: 2008-09-04T17:42:04+02:00 List-Id: On Thu, 4 Sep 2008 17:16:05 +0200, Karel Th�nissen wrote: > Just to be nitpicking: coming from a DbC-background, a division by zero > should raise a *violation* of contract, not an exception. A violation indeed > is a contraction with the explicitly stated contracts. After a violation > anything goes. This contradiction is not the contradiction T of multi-valued logic. Violation of DbC is a contradiction in the interpretation of a formula F. It tells that F is incorrect <=> F is not a language statement. On the contrary, the symbol T (or an exception propagation) is itself correct, it is a language term. Whether division by zero is illegal (a contract violation) or T (exceptional), is a question of type language/design. Ada uses the latter, because the former would make illegal programs compilable, which nobody wants. > *Exceptions* should be used for things that can be expected, but that should > be very rare and that are to hard to handle using standard control > structures. Think of printers that break down, or network failures. Yes. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de