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=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!goblin3!goblin.stu.neva.ru!nntp-feed.chiark.greenend.org.uk!ewrotcd!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: The future of Spark . Spark 2014 : a wreckage Date: Thu, 18 Jul 2013 23:36:44 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <1d4tuwlfdnz2j$.18l68s96x3vjj.dlg@40tude.net> <984821833395507830.672948rm-host.bauhaus-maps.arcor.de@news.arcor.de> <15q73x8g743d.solfjve1fywf$.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1374208606 24676 69.95.181.76 (19 Jul 2013 04:36:46 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 19 Jul 2013 04:36:46 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Original-Bytes: 2652 Xref: number.nntp.dca.giganews.com comp.lang.ada:182580 Date: 2013-07-18T23:36:44-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:15q73x8g743d.solfjve1fywf$.dlg@40tude.net... > On Wed, 17 Jul 2013 18:08:17 -0500, Randy Brukardt wrote: ... >> I didn't mean this to be a real example. An example like the one given >> probably would have been better written as a precondition (depending on >> exactly what Foo does): >> >> procedure Op (x : in out T) >> with Pre => Foo(x) or else raise Constraint_Error, >> Post => Foo(x); >> >> which is just normal Ada 2012 code (using the raise expression, which we >> added 'after the fact' to support this usage). > > Yep, and also highlights the inconvenient truth, that the "precondition" > is > not a precondition but rather a chunk of executable code pushed in front > of > the body. Well, it's special in the sense that the compiler will try hard to eliminate it, and generally, I think a compiler should generate a warning if it *can't* remove the precondition. (That might be hard to accomplish initially, mainly because the removal code happens after the stage where warnings can easily be given.) In that sense, it's executable in name only. > Why not to honestly call it Prologue? I presume people wanted to match common usage (as in Eiffel, for instance). Randy.