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: a07f3367d7,6327f05d4989a68d X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 X-Received: by 10.180.74.79 with SMTP id r15mr9895637wiv.4.1356837411773; Sat, 29 Dec 2012 19:16:51 -0800 (PST) Path: i11ni337243wiw.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!newsreader4.netcologne.de!news.netcologne.de!news.swapon.de!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Press Release - Ada 2012 Language Standard Approved by ISO Date: Mon, 24 Dec 2012 10:02:47 +0100 Organization: cbb software GmbH Message-ID: References: <7wrdmbre6jw9.qww9l0uzj6mg.dlg@40tude.net> <14oqoq06zhlu2.tcasif3hdyhw.dlg@40tude.net> <1drh1q1ln2dfh$.a9hwlg01fjfy.dlg@40tude.net> <50d6365d$0$6577$9b4e6d93@newsspool3.arcor-online.net> <1pbg79bz92j3t$.sz41zduivjfp.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 6/SyjDFvQ5V7ZR2+GYgbDQ.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Date: 2012-12-24T10:02:47+01:00 List-Id: On Mon, 24 Dec 2012 07:44:00 +0100, Yannick Duchêne (Hibou57) wrote: > Indeed, one may argue > they are the exceptions an implementation raise it self (either to match a > contract or more freely) and they are the ones its dependencies may raise. The contract: "I raise if you do" is not an exposition of implementation details. Exception contracts must be conditional, that is clear. Otherwise closures and things like Storage_Error will not work. > Some exceptions are under control, some are not. Think about an hardware > failure during some processing, as an example… Such things (faults) are not exceptions. They raise (if ever) in a context not affected by the fault. E.g. master task, another partition, OS. There you can contract them. > May be the contract, instead of specifying exhaustively what exceptions a > sub‑program may raises, could instead specify it may raise “this one”, or > must not raise “this other one”, all other exceptions being of unspecified > occurrence. Yes "I raise X" does not imply "I do not raise not X." It is intuitionistic logic. You have X, a negation of X and a gray area between them. P does not imply not P. Furthermore exception contracts must include stuff for which people would misuse post-conditions and predicates. That is sqrt(x) raises Constraint_Error if x < 0 [+ sqrt(x) may not raise Constraint_Error if x >= 0 ] rather than weaker sqrt may raise Constraint_Error = = sqrt(x) raises Constraint_Error if Merry Christmas, -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de