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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,342dcd67e9ca73ee X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news1.optus.net.au!optus!newsfeed.pacific.net.au!nasal.pacific.net.au!not-for-mail Newsgroups: comp.lang.ada Subject: Re: tagged record child: override constructor? From: David Trudgett Organization: Very little? References: <1126591134.797303.318920@z14g2000cwz.googlegroups.com> Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:m+JnY38BScCi4A6ArLNGwuMJ4Bc= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 13 Sep 2005 16:39:56 +1000 NNTP-Posting-Host: 61.8.38.217 X-Complaints-To: news@pacific.net.au X-Trace: nasal.pacific.net.au 1126593868 61.8.38.217 (Tue, 13 Sep 2005 16:44:28 EST) NNTP-Posting-Date: Tue, 13 Sep 2005 16:44:28 EST Xref: g2news1.google.com comp.lang.ada:4600 Date: 2005-09-13T16:39:56+10:00 List-Id: sean.gilbertson@gmail.com writes: > I have a tagged record that is declared private, along with a > constructor function which returns an instance. I do this to enforce > the assignment of several required fields in the record, so if you know > how to do this another way, please let me know! Have you thought about using Ada.Finalization? (Check the Ada Reference Manual.) Others, more knowledgeable, might have other suggestions for you. David -- David Trudgett http://www.zeta.org.au/~wpower/ In his essay 'The Banality of Evil', the great American dissident Edward Herman described the division of labour among those who design and produce weapons like cluster bombs and daisy cutters and those who take the political decisions to use them and those who create the illusions that justify their use. 'It is the function of the experts, and the mainstream media,' he wrote, 'to normalise the unthinkable for the general public.' It is time journalists reflected upon this, and took the risk of telling the truth about an unconscionable threat to much of humanity that comes not from faraway places, but close to home. -- John Pilger, 'The truths they never tell us' , New Statesman, November 26, 2001