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


|