From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Performance of access type : a tiny mistake in the WikiBook ?
Date: Thu, 8 Oct 2009 11:11:42 +0200
Date: 2009-10-08T11:11:42+02:00 [thread overview]
Message-ID: <13mqt48xnu52t.6bpnbqnox4m4$.dlg@40tude.net> (raw)
In-Reply-To: f4a9b321-7ab8-49e5-9fa1-373cf3553f5a@j9g2000vbp.googlegroups.com
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 <nothing>
pool specific before general access
But:
not null vs. <nothing> 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
next prev parent reply other threads:[~2009-10-08 9:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-07 20:59 Performance of access type : a tiny mistake in the WikiBook ? Hibou57 (Yannick Duchêne)
2009-10-07 22:38 ` (see below)
2009-10-07 23:30 ` Yannick Duchêne Hibou57
2009-10-08 0:30 ` (see below)
2009-10-08 0:48 ` Yannick Duchêne Hibou57
2009-10-08 9:11 ` Dmitry A. Kazakov [this message]
2009-10-08 9:55 ` Gautier write-only
2009-10-08 16:04 ` Yannick Duchêne Hibou57
2009-10-08 16:46 ` Yannick Duchêne Hibou57
2009-10-08 19:41 ` Gautier write-only
2009-10-09 6:14 ` Yannick Duchêne Hibou57
2009-10-09 18:51 ` sjw
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox