From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Run-time accessibility checks
Date: Thu, 11 Dec 2008 12:40:32 +0100
Date: 2008-12-11T12:40:32+01:00 [thread overview]
Message-ID: <1abvztyo27831.169xig7skkqig$.dlg@40tude.net> (raw)
In-Reply-To: 4940f7be$0$30232$9b4e6d93@newsspool1.arcor-online.net
On Thu, 11 Dec 2008 12:21:34 +0100, Georg Bauhaus wrote:
> Dmitry A. Kazakov schrieb:
>
>> This is what I call abstract record interface. For each component it will
>> have two operations:
>>
>> function ".<component>" (R : Abstract_Record_Type)
>> return Component_Type is abstract;
>> procedure ".<component>"
>> (R : in out Abstract_Record_Type; C : Component_Type) is abstract;
>>
>> The compiler uses the second (setter) for all LHS X.Component.
>
> That with pre/post/invariant constraints, in case the
> component setting procedure has access to the object
> containing the component.
It is a primitive operation of the abstract record type, but not of the
component. If you wanted to have it a primitive operation of both, you
would have to support MD, which is I don't know how to do (properly).
> Could pre/post/invariant also help when checking order of
> component assignments?
Which order? A record type does not declare any specific access order for
its components. If you have record aggregates in mind that is another
interface and another issue. Aggregate is a form of a constructor with some
special syntax.
> (These are called "assigner commands" in Eiffel.)
There are pretty clear rules about what happens with pre/post/invariant
upon inheritance (Liskov). The only problem is that many people (like Meyer
and possibly you) honestly believe they could make pre/post/invariant
dynamic. Count me out.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2008-12-11 11:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-06 10:15 Run-time accessibility checks (was: Construction initialization problem) Dmitry A. Kazakov
2008-12-06 17:10 ` Ludovic Brenta
2008-12-07 8:44 ` Run-time accessibility checks Dmitry A. Kazakov
2008-12-07 14:56 ` Ludovic Brenta
2008-12-07 19:22 ` Dmitry A. Kazakov
2008-12-11 1:03 ` Randy Brukardt
2008-12-11 9:08 ` Dmitry A. Kazakov
2008-12-11 0:55 ` Run-time accessibility checks (was: Construction initialization problem) Randy Brukardt
2008-12-11 9:48 ` Run-time accessibility checks Dmitry A. Kazakov
2008-12-11 11:21 ` Georg Bauhaus
2008-12-11 11:40 ` Dmitry A. Kazakov [this message]
2008-12-11 22:15 ` Run-time accessibility checks (was: Construction initialization problem) Randy Brukardt
2008-12-11 22:31 ` Randy Brukardt
2008-12-13 0:49 ` Randy Brukardt
2008-12-13 9:06 ` Run-time accessibility checks Dmitry A. Kazakov
2008-12-16 1:53 ` Randy Brukardt
2008-12-16 9:28 ` Dmitry A. Kazakov
2008-12-16 22:21 ` Randy Brukardt
2008-12-17 8:54 ` Dmitry A. Kazakov
2008-12-12 9:21 ` 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