Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Ada > Re: Question ab...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 12 Topic 5651 of 5800
Post > Topic >>

Re: Question about circular elaboration order error (GNAT).

by Robert A Duff <bobduff@[EMAIL PROTECTED] > Apr 14, 2008 at 04:21 PM

Samuel Tardieu <sam@[EMAIL PROTECTED]
> writes:

>>>>>> "Robert" == Robert A Duff <bobduff@[EMAIL PROTECTED]
> writes:
>
> Robert> Samuel Tardieu <sam@[EMAIL PROTECTED]
> 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
 




 12 Posts in Topic:
Question about circular elaboration order error (GNAT).
"Peter C. Chapin&quo  2008-04-13 14:12:34 
Re: Question about circular elaboration order error (GNAT).
Samuel Tardieu <sam@[E  2008-04-13 21:43:19 
Re: Question about circular elaboration order error (GNAT).
Robert A Duff <bobduff  2008-04-13 16:20:30 
Re: Question about circular elaboration order error (GNAT).
Samuel Tardieu <sam@[E  2008-04-13 23:20:42 
Re: Question about circular elaboration order error (GNAT).
Robert A Duff <bobduff  2008-04-14 16:21:54 
Re: Question about circular elaboration order error (GNAT).
Adam Beneschan <adam@[  2008-04-14 16:36:41 
Re: Question about circular elaboration order error (GNAT).
Georg Bauhaus <rm.tsoh  2008-04-15 09:13:38 
Re: Question about circular elaboration order error (GNAT).
Robert A Duff <bobduff  2008-04-13 15:46:29 
Re: Question about circular elaboration order error (GNAT).
"Peter C. Chapin&quo  2008-04-13 18:49:25 
Re: Question about circular elaboration order error (GNAT).
Robert A Duff <bobduff  2008-04-14 09:56:03 
Re: Question about circular elaboration order error (GNAT).
"Jeffrey R. Carter&q  2008-04-14 17:33:33 
Re: Question about circular elaboration order error (GNAT).
Robert A Duff <bobduff  2008-04-14 13:52:59 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 19:38:01 CDT 2008.