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,73f81e5f5d6ee80f X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: MI is sloppy Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1g29uf1ygl1wc$.1x184o2bk9m0k$.dlg@40tude.net> <1hjx0k7xmfw4n$.14q7chpo1r1ma$.dlg@40tude.net> <49424203$0$31868$9b4e6d93@newsspool3.arcor-online.net> Date: Fri, 12 Dec 2008 12:15:30 +0100 Message-ID: NNTP-Posting-Date: 12 Dec 2008 12:15:30 CET NNTP-Posting-Host: 0aba7446.newsspool2.arcor-online.net X-Trace: DXC=88FkoPk^U=_V;Ef1`Jk54\A9EHlD;3YcR4Fo<]lROoRQ^YC2XCjHcbY`d7CP3Joi5[DNcfSJ;bb[UFCTGGVUmh?TLK[5LiR>kgRF_0YV`V8hoP X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:3945 Date: 2008-12-12T12:15:30+01:00 List-Id: On Fri, 12 Dec 2008 11:50:43 +0100, Georg Bauhaus wrote: > Dmitry A. Kazakov schrieb: >> To me it is exactly same. The precondition not to be in a subtype is >> equivalent to disallowing the operations specific to that subtype. Unless >> precondition is treated as a constraint check with Constraint_Error >> propagated. In the latter case Get is merely an overriding by the body >> >> begin >> raise Constraint_Error; >> end; >> >> Not very exciting to me. > > If you have an ambitious compiler, it might reach out, > at compile time, for objects whose behavior is then known > to be constrained by membership in a then known specific > subtype. ... and then inline raising Constraint_Error. Great! Constraint_Error propagation is the contracted behavior. You have signed that contract, enjoy it. Ambitious is not to be always forced to such contracts... -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de