comp.lang.ada
 help / color / mirror / Atom feed
From: dlwester@hotmail.com (Don Westermeyer)
Subject: Re: Elaboration of nested generic package.
Date: 10 Jul 2003 08:03:14 -0700
Date: 2003-07-10T15:03:15+00:00	[thread overview]
Message-ID: <5437fafb.0307100703.16291e68@posting.google.com> (raw)
In-Reply-To: 3F0CC2D1.10904@attbi.com

"Robert I. Eachus" <rieachus@attbi.com> wrote in message news:<3F0CC2D1.10904@attbi.com>...
> 
>>
> But in general, if the compiler can't figure it out, the programmer is 
> very unlikely to have a decent answer in mind.
>

Well, some compilers do better at this than others, and in the case of
one compiler I've worked it apparently just picks a fairly random
order in which to elaborate things.  The elaborate pragmas pretty much
guarantee elaboration dependancy problems are caught at compile/link
time vs. execution (where on target hardware the debugging can be
quite difficult - especially exceptions during elaboration).

Another problem is when using packages written by others you may not
know if it needs to be elaborated or not.  For instance by just simply
declaring a variable one can set off a complex series of program
statements.

Seems to me that it is always safer to use the pragmas.  As long as
circular dependancies are avoided the compile will have no difficulty
with this.


At least Ada provides decent error checking for elaboration issues. 
Other languages (like Borland Delphi for instance) will just let you
hang yourself if you get too fancy during elaboration.



  parent reply	other threads:[~2003-07-10 15:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-02  4:13 Elaboration of nested generic package christoph.grein
2003-07-08  3:05 ` Don Westermeyer
2003-07-08 17:46   ` Matthew Heaney
2003-07-10  1:10     ` Don Westermeyer
2003-07-10  1:35       ` Robert I. Eachus
2003-07-10  4:51         ` Robert I. Eachus
2003-07-10  6:58           ` Jean-Pierre Rosen
2003-07-10 15:08             ` Robert I. Eachus
2003-07-11 21:26             ` Robert A Duff
2003-07-10 14:12         ` Matthew Heaney
2003-07-10 15:39           ` Robert I. Eachus
2003-07-11 21:41           ` Robert A Duff
2003-07-14 18:35             ` Matthew Heaney
2003-07-15 17:19               ` Randy Brukardt
2003-07-16 15:24                 ` Matthew Heaney
2003-07-17  2:08                   ` Randy Brukardt
2003-07-17 15:54                     ` Richard Riehle
2003-07-10 15:03         ` Don Westermeyer [this message]
2003-07-10 15:45       ` Matthew Heaney
  -- strict thread matches above, loose matches on Subject: below --
2003-07-09  5:21 christoph.grein
2003-07-01 20:14 Don Westermeyer
replies disabled

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