comp.lang.ada
 help / color / mirror / Atom feed
From: Bryan@SU-SIERRA.ARPA (Doug Bryan)
Subject: elaboration of package specs
Date: Mon, 27-Jan-86 15:11:25 EST	[thread overview]
Date: Mon Jan 27 15:11:25 1986
Message-ID: <8601272025.AA19624@ucbvax.berkeley.edu> (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
-------

             reply	other threads:[~1986-01-27 20:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1986-01-27 20:11 Doug Bryan [this message]
1986-02-04 22:08 ` elaboration of package specs info-ada
replies disabled

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