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,b78c363353551702 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.196.232 with SMTP id ip8mr15757440pbc.6.1341650654974; Sat, 07 Jul 2012 01:44:14 -0700 (PDT) Path: l9ni11068pbj.0!nntp.google.com!news1.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!news.musoftware.de!wum.musoftware.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: about the new Ada 2012 pre/post conditions Date: Sat, 7 Jul 2012 10:44:03 +0200 Organization: cbb software GmbH Message-ID: <78n9kf0q7qyt$.1fcvp20legeok$.dlg@40tude.net> References: <1jt8vhzxfrv2i.eohce4d3rwx1$.dlg@40tude.net> <4fe83aaa$0$6624$9b4e6d93@newsspool2.arcor-online.net> <1pkfv0tiod3rn$.onx6dmaa3if9$.dlg@40tude.net> <1i1mp8xs3vtl2.1oc4m66qtfgzq.dlg@40tude.net> <4fe9bde5$0$6566$9b4e6d93@newsspool4.arcor-online.net> <1otknesgpcisl$.112pd12on3vsb$.dlg@40tude.net> <1etm46gu9c54e$.rkbmrzh5ia6$.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 9A8bJrx4NhDLcSmbrb6AdA.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="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-07-07T10:44:03+02:00 List-Id: On Fri, 6 Jul 2012 20:09:32 -0500, Randy Brukardt wrote: > "Dmitry A. Kazakov" wrote in message > news:l2v5ycmyjzk.11k6wbda0san5.dlg@40tude.net... > ... >> Instead I offered a bait: two options to choose #1 and #2. These two are >> complete and independent. It cannot be both, it cannot be none. > > They're only "complete and independent" if and only if "contract" includes > dynamic contracts. Otherwise, there have to be three things (call the third > one "specification", if you like). #3 specification. So, dynamic checks belong to specifications? It gets better every day... >> There is no contract violated when End_Error is raised by file Read. It is >> not the contract of Read to be supplied with infinite files! > > Certainly not. End_Error is clearly not part of the precondition of Read. I.e. you agree that exceptions are not necessarily errors. I am glad to hear that, because others claimed that all exceptions are errors. Now, Constraint_Error is an error and End_Error is not so error? Right? > End_Error being raised by Read is perfectly normal. Mode_Error being raised > by Read is a serious bug. So what? I would like to know why Mode_Error is a "serious bug," while End_Error is no bug at all. What in the *language* makes them different? > You seem to want hard rules, but that is not how anything works in the real > world. After all, "everything is legal so long as you don't get caught" > (Traveling Wilburys). No, I want *clear* terms without false excuses about practicality. Now, it is utterly IMPRACTICAL to draw lines between End_Error, Mode_Error, Constraint_Error. They all belong to the implementation. All cases when raised must be contracted formally or informally. >>> That seems to fit perfectly >>> with such as CONSTRAINT_ERROR or PROGRAM_ERROR, no? >> >> No, these are not contract violations. When they are pretended to be, they >> incur incredible harm. > > What harm? The program is wrong when these happen. See above. You are trying to prescribe semantics of a program you never saw. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de