From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: MI is sloppy
Date: Fri, 12 Dec 2008 12:15:30 +0100
Date: 2008-12-12T12:15:30+01:00 [thread overview]
Message-ID: <bmzxjki02y3x$.2ruklayq2oor.dlg@40tude.net> (raw)
In-Reply-To: 49424203$0$31868$9b4e6d93@newsspool3.arcor-online.net
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
next prev parent reply other threads:[~2008-12-12 11:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-06 10:09 MI is sloppy (was: Construction initialization problem) Dmitry A. Kazakov
2008-12-06 17:16 ` Georg Bauhaus
2008-12-06 21:16 ` Martin Krischik
2008-12-06 21:35 ` Maciej Sobczak
2008-12-07 9:12 ` MI is sloppy Dmitry A. Kazakov
2008-12-07 15:38 ` Georg Bauhaus
2008-12-07 20:04 ` Dmitry A. Kazakov
2008-12-11 0:40 ` MI is sloppy (was: Construction initialization problem) Randy Brukardt
2008-12-11 10:02 ` MI is sloppy Dmitry A. Kazakov
2008-12-11 21:44 ` Randy Brukardt
2008-12-11 23:17 ` Georg Bauhaus
2008-12-12 10:06 ` Dmitry A. Kazakov
2008-12-12 9:59 ` Dmitry A. Kazakov
2008-12-12 10:50 ` Georg Bauhaus
2008-12-12 11:15 ` Dmitry A. Kazakov [this message]
2008-12-12 12:15 ` Georg Bauhaus
2008-12-12 13:35 ` Dmitry A. Kazakov
2008-12-12 14:29 ` Georg Bauhaus
2008-12-12 14:59 ` Dmitry A. Kazakov
2008-12-13 0:08 ` Randy Brukardt
2008-12-13 9:54 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox