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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham 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!news1.google.com!news.glorb.com!newsfeed2.telusplanet.net!newsfeed.telus.net!edtnps89.POSTED!023a3d7c!not-for-mail Sender: blaak@METROID Newsgroups: comp.lang.ada Subject: Re: contracted exceptions References: <1181165630.012508.55290@i38g2000prf.googlegroups.com> <19fxsxv1god43$.1pqq8vgfu2itn$.dlg@40tude.net> From: Ray Blaak Message-ID: Organization: The Transcend User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 08 Jun 2007 17:31:05 GMT NNTP-Posting-Host: 208.66.252.228 X-Trace: edtnps89 1181323865 208.66.252.228 (Fri, 08 Jun 2007 11:31:05 MDT) NNTP-Posting-Date: Fri, 08 Jun 2007 11:31:05 MDT Xref: g2news1.google.com comp.lang.ada:16116 Date: 2007-06-08T17:31:05+00:00 List-Id: "Dmitry A. Kazakov" writes: > > In practical terms, an exception contract primarily affects the programmer > > in forcing them to ensure that callers' contracts are compatible. This is > > artificial work. > > Why? Isn't passing a proper floating-type argument instead of > anything-with-a-dot-in-the-middle artificial as well? No, because the recipient of the argument requires correct data for processing. With the throwing of an exception, in practice it is only exception clauses being enforced, and their purpose is only for enforcing other exception clauses. No real work, in practical terms. Note that by "contract" I am referring only to some imaginary Ada syntax that indicates that a subprogram can raise a particular set of exceptions. > > An exception's type and details are primarily useful for (eventually) > > showing to the user, to aid in post-analysis of the problem. > > OK, this is a fundamental disagreement on what is fault and what is error. > We'd better not go into it. Hm. I'm not so sure there is a disagreement as such with fault vs error. I guess that my point is that what the software does in response to both tends to be the same: report it and reset/halt/whatever. It the the humans that react differently in response: fix the environment for the fault, or fire the programmer for the error. -- Cheers, The Rhythm is around me, The Rhythm has control. Ray Blaak The Rhythm is inside me, rAYblaaK@STRIPCAPStelus.net The Rhythm has my soul.