From: Matthew Heaney <matthew_heaney@acm.org>
Subject: Re: Mutually dependent private types
Date: 1998/05/28
Date: 1998-05-28T00:00:00+00:00 [thread overview]
Message-ID: <m34syanhcg.fsf@mheaney.ni.net> (raw)
In-Reply-To: 356E09A1.B493FE89@ac3i.dseg.ti.com
John Volan <johnv@ac3i.dseg.ti.com> writes:
> > I don't know what to do really. Maybe a pragma be better:
> >
> > with P;
> > pragma Mutual (P);
> > package Q is
>
> It seems to me that if there's a mutual spec dependency going on between
> P and Q, then the "with" clause here is already illegal according to
> Ada95's language rules. So what exactly would this "Mutual" pragma
> mean? "I know the with clause is illegal, but ignore that and pretend
> to be a different language"? :-) What about Ada95's run-time
> elaboration mechanism? When would the elaboration code for the specs of
> packages P and Q get executed? In what order?
The pragma idea is more or less equivalent to "with P.T".
Thinking about it more, you could name it thusly:
with P;
pragma Elaborate_None (P);
package Q is ...;
So the answer to your question is that the spec for P is not elaborated
prior to its use (with certain constraints) by Q.
Yes, the "with type" idea was Tuck's, but I'd be willing to bet this
problem will be solved using a new set of pragmas. We already have a
precedent for using pragmas for elaboration control, and since this is
really an elaboration issue, an additional pragma seems like a more
natural fit.
next prev parent reply other threads:[~1998-05-28 0:00 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-05-21 0:00 Mutually dependent private types adam
1998-05-21 0:00 ` Matthew Heaney
1998-05-22 0:00 ` John Volan
1998-05-22 0:00 ` Matthew Heaney
1998-05-26 0:00 ` John Volan
1998-05-26 0:00 ` Matthew Heaney
1998-05-27 0:00 ` John Volan
1998-05-27 0:00 ` Matthew Heaney
1998-05-28 0:00 ` John Volan
1998-05-28 0:00 ` Matthew Heaney [this message]
1998-05-29 0:00 ` John Volan
1998-05-29 0:00 ` Brian Rogoff
1998-05-29 0:00 ` John Volan
1998-05-29 0:00 ` Brian Rogoff
1998-05-29 0:00 ` John Volan
1998-05-30 0:00 ` Geoff Bull
1998-05-30 0:00 ` Fergus Henderson
1998-06-01 0:00 ` John Volan
1998-06-02 0:00 ` Fergus Henderson
1998-06-04 0:00 ` Robert Dewar
1998-05-26 0:00 ` Robert I. Eachus
1998-05-26 0:00 ` John Volan
1998-05-27 0:00 ` Robert I. Eachus
1998-05-29 0:00 ` John Volan
1998-05-27 0:00 ` Jerry van Dijk
1998-05-29 0:00 ` John Volan
1998-05-21 0:00 ` John Volan
-- strict thread matches above, loose matches on Subject: below --
1998-05-22 0:00 adam
1998-05-22 0:00 ` Matthew Heaney
1998-05-22 0:00 ` Brian Rogoff
1998-05-22 0:00 ` John Volan
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox