From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2485cb1936a0a4ec X-Google-Attributes: gid103376,public From: dkristol@see-my.sig (David Kristola) Subject: Re: Package with initialization only Date: 1999/07/22 Message-ID: <7n65nl$1ru2@svlss.lmms.lmco.com>#1/1 X-Deja-AN: 503847599 Distribution: world References: <37964947.5C95E5D1@hso.link.com> Organization: LockMart Reply-To: dkristol@see-my.sig Newsgroups: comp.lang.ada Date: 1999-07-22T00:00:00+00:00 List-Id: "Samuel T. Harris" () writes: >Ted Dennison wrote: >> >> In article <37961DD6.E56BD3E9@maths.unine.ch>, >> Gautier wrote: >> > A small "aesthetic" problem: I have a package with initialization >> only; >> > thus I must add a dummy procedure to resolve the with/without body >> > ambiguity Ada95 doesn't accept. There is surely a more elegant >> formulation, >> >> Well, perhaps it would be more pleasing if you renamed your dummy >> routine "Initialize" and moved all the initialization code into it. If >> you put it into the public part that would even allow others to >> reinitialize the variable. >> > >While I don't disagree with Ted's suggestion, >I do want to point out that many times the >"intialization" must be done only once, preferably >during elaboration. In such cases, I call the >procedure "elaborate" and call it in the package body. >I feel the name elaborate conveys the restriction >of single initialization 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 interrupts. There was a handler to deal with the situation, but it was not installed yet. Installation of interrupt handlers was the first thing the main program did after elaboration. --djk, keeper of arcane lore & trivial fluff Home: David95037 at aol dot com Spam: goto.hades@welovespam.com