comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@telepath.com>
Subject: Re: Package with initialization only
Date: 1999/07/22
Date: 1999-07-22T00:00:00+00:00	[thread overview]
Message-ID: <7n77dn$rmj$1@nnrp1.deja.com> (raw)
In-Reply-To: 7n65nl$1ru2@svlss.lmms.lmco.com

In article <7n65nl$1ru2@svlss.lmms.lmco.com>,
  dkristol@see-my.sig wrote:
> "Samuel T. Harris" <sam_harris@hso.link.com> () writes:
> Maybe it is my real-time embedded systems background,
> but i much prefer explicit initialization over
> elaboration.  The example that immediately comes to
> mind is a case where the elaboration code wrote over
> a memory mapped bus and sometimes caused contention

Agree completely. Also doing large amounts of work during elaboration
tends to lead to elaboration order problems, often manifested as hard to
track down Program_Error's that may go away or reappear or move around
every time a new unit is added. There's also the issue that many
debuggers make it difficult to stop or step in elaboration code.

There's also the confusing situation where the package needs to be
with'ed in by the main unit so that its elaboration code can run, even
though no unit in the entire program actually *uses* an entity from the
pacakge's spec. %-(  Its very tempting to remove the "with"s, as leaving
in obsolete "with"s is a common programmer error. Putting the
elaboration code into an "Initialize" routine that gets called by the
main unit makes it much more explicit what's going on (and very often
gives the main unit some small semblance of a job to do).

--
T.E.D.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




  reply	other threads:[~1999-07-22  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-21  0:00 Package with initialization only Gautier
1999-07-21  0:00 ` Martin C. Carlisle
1999-07-21  0:00 ` Ted Dennison
1999-07-21  0:00   ` Samuel T. Harris
1999-07-21  0:00     ` David C. Hoos, Sr.
1999-07-22  0:00     ` David Kristola
1999-07-22  0:00       ` Ted Dennison [this message]
1999-07-22  0:00       ` Samuel T. Harris
1999-07-22  0:00       ` Marin David Condic
1999-07-22  0:00         ` laoxhai
1999-07-21  0:00 ` Robert A Duff
1999-07-21  0:00 ` Gautier de Montmollin
1999-07-22  0:00 ` Robert I. Eachus
replies disabled

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