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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,b14a804025dceb20 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-10-27 11:11:14 PST Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!freenix!proxad.net!feeder2.proxad.net!nnrp6.proxad.net.POSTED!not-for-mail Message-ID: <39F9C5E5.29FE98CF@bigfoot.com> From: Francois Godme X-Mailer: Mozilla 4.72 [fr] (X11; U; Linux 2.2.14-5.0 i586) X-Accept-Language: fr, en-US, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Constructors/Destructors in Ada95 References: <39EE160D.F0A2000@bigfoot.com> <39EF5431.BF4CD793@bigfoot.com> <39F0A6C7.E592AFFB@averstar.com> <39F4AE95.4DB04145@bigfoot.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Fri, 27 Oct 2000 18:11:12 GMT NNTP-Posting-Host: 213.228.21.58 X-Complaints-To: abuse@proxad.net X-Trace: nnrp6.proxad.net 972670272 213.228.21.58 (Fri, 27 Oct 2000 20:11:12 CEST) NNTP-Posting-Date: Fri, 27 Oct 2000 20:11:12 CEST Organization: Guest of ProXad - France Xref: supernews.google.com comp.lang.ada:1599 Date: 2000-10-27T18:11:12+00:00 List-Id: Ray Blaak a �crit : > Francois Godme writes: > > > I. Non-primitive procedures used as constructors of limited instances: As > > limited instances can't be initialized with record aggregates, it is possible > > to write code which forgets to initialize all record fields. > > Forgetting to initialize a field is equivalent to using a default constructor, > no? In that case the Initialize routine can cover it. > Recall that the context was that defaulted record fields and the Initialize routine were said inadequate to initialize all instances. Take for example, the class Person. There are no such things as a default birth date, a default sex or a default eyes color for instances of the class Person. To provide methods to later fix the birth date, the sex and the eyes color to appropriate values opens up instances to mistakes. These three instance attributes should be constant and hence initialized by the constructor.