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,98dc917fce16b418 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!inka.de!rz.uni-karlsruhe.de!news.belwue.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Performance of access type : a tiny mistake in the WikiBook ? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <91ad7397-27a8-4b9d-811e-6e62d485645c@v2g2000vbb.googlegroups.com> <31da5154-9739-4ead-8437-aaa5d70dc7e8@h30g2000vbr.googlegroups.com> Date: Thu, 8 Oct 2009 11:11:42 +0200 Message-ID: <13mqt48xnu52t.6bpnbqnox4m4$.dlg@40tude.net> NNTP-Posting-Date: 08 Oct 2009 11:11:42 CEST NNTP-Posting-Host: bc467ab0.newsspool4.arcor-online.net X-Trace: DXC=93`BkMEncI[5TOT9_N5i_R6B\4WUg@XW X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:8618 Date: 2009-10-08T11:11:42+02:00 List-Id: On Wed, 7 Oct 2009 17:48:56 -0700 (PDT), Yannick Duch�ne Hibou57 wrote: > I understand what you mean about testing, but I am mainly looking for > average answers. The average answer is that any static constraint known to hold must be specified. Rationale: this weakens the precondition, which the compiler should otherwise check dynamically, i.e. possibly generate some additional code. For non-static constraints the rule is opposite, because it strengthens the precondition. So: in before in out constant before pool specific before general access But: not null vs. depends on the where that constraint was put subtype vs. type, ditto specific type vs. class, ditto -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de