comp.lang.ada
 help / color / mirror / Atom feed
* elaboration of package specs
@ 1986-01-27 20:11 Doug Bryan
  1986-02-04 22:08 ` info-ada
  0 siblings, 1 reply; 2+ messages in thread
From: Doug Bryan @ 1986-01-27 20:11 UTC (permalink / raw)



consider...
	
	function Initial_Value return Integer;
	function Initial_Value return Integer is
        begin
	   return 42;
	end Initial_Value;

	package X is
	   I : Integer;
	end X;

	with Initial_Value;
	package body X is
	begin
	   I := Initial_Value;
	end X;

Suppose that the above four compilation units are compiled in the order
presented.  Then the function is rewritten as follows:

	function Initial_Value (I : Integer) return Integer;
	function Initial_Value (I : Integer) return Integer is
	begin
	   return I + 42;
	end Initial_Value;

and both the spec and body are recompiled.  May the package X be elaborated
without the recompilation if its body?  It is clear that the body of X
becomes obsolete if the spec of Initial_Value is recompiled.  I heard
that the language experts panel in Boston decided that in such a case
the spec of X may be elaborated and that the body of X would be ignored.
Does "obsolete" mean "removed from the library".  I always had the
understanding that a compilation unit, within a library, could be in one
of three states:

	1- ready for elaboration
	2- obsolete
	3- non-existent

If it was obsolete, it could not be elaborated.  If a compilation unit
was dependant on an obsolete unit, it too could not be elaborated.  It
seems that the new view is that the spec of X is not really dependant
on the body of X.

??

doug
-------

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1986-02-04 22:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1986-01-27 20:11 elaboration of package specs Doug Bryan
1986-02-04 22:08 ` info-ada

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