comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Question about circular elaboration order error (GNAT).
Date: Mon, 14 Apr 2008 16:21:54 -0400
Date: 2008-04-14T16:21:54-04:00	[thread overview]
Message-ID: <wccmynwchlp.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 87od8dpi39.fsf@willow.rfc1149.net

Samuel Tardieu <sam@rfc1149.net> writes:

>>>>>> "Robert" == Robert A Duff <bobduff@shell01.TheWorld.com> writes:
>
> Robert> Samuel Tardieu <sam@rfc1149.net> writes:
>>> No. pragma Elaborate_All is transitive, and forces the elaboration
>>> of Parent body (since Parent.Child has an implicit dependency on
>>> Parent)
>
> Robert> Yes, it has a dependence.  But why do you call it "implicit"?
>
> Because it is not spelt explicitely using a with clause or an
> Elaborate/Elaborate_All pragma. And if it's not explicit, it must be
> implicit.

OK.

To me, the primary purpose of a with clause, and the primary purpose of
a parent name, is their effect on visibility.  Both appear explicitly in
the code.  Secondary issues are semantic dependences, compilation
dependences, and elaboration-order dependences.  So I don't see one as
more "implicit" than the other.

The reason I asked is that "implicit" is often a matter of opinion, and
I'm curious about what it means to people in cases like this.  There was
some argument at AdaCore recently about what

    pragma Restrictions (No_Implicit_Heap_Allocations);

means in a certain obscure case.

> One could say that when you write "package Parent.Child", you
> explicitely spell "Parent" so this is an explicit dependency
> declaration.

Yes, one could, and I do.  ;-)

>...However, for me it is a declaration of the "Parent.Child"
> package, which implicitely creates a semantic dependency on Parent.
>
> Now, I think we are both nitpicking here,...

Nitpicking?  Yes, I plead guilty as charged.  ;-)

>... as I don't think the RM says
> anything about "explicit" vs. "implicit" dependencies, it only
> consider "static dependences" and "elaboration dependences".
>
> Btw, I never noticed the use of "dependence" vs. "dependency"
> before. Is there a difference in English?

I don't know.  Most people say "dependency".  But the Ada 83 RM used
"dependence", and we didn't change it for Ada 95 (or 2005),
and I've gotten used to typing that.

Note that the primary author of Ada 83 was a Frenchman.  ;-)

- Bob



  reply	other threads:[~2008-04-14 20:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-13 18:12 Question about circular elaboration order error (GNAT) Peter C. Chapin
2008-04-13 19:43 ` Samuel Tardieu
2008-04-13 20:20   ` Robert A Duff
2008-04-13 21:20     ` Samuel Tardieu
2008-04-14 20:21       ` Robert A Duff [this message]
2008-04-14 23:36         ` Adam Beneschan
2008-04-15  7:13           ` Georg Bauhaus
2008-04-13 19:46 ` Robert A Duff
2008-04-13 22:49   ` Peter C. Chapin
2008-04-14 13:56     ` Robert A Duff
2008-04-14 17:33 ` Jeffrey R. Carter
2008-04-14 17:52   ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox