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.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,b14a804025dceb20 X-Google-Attributes: gid103376,public From: Francois Godme Subject: Re: Constructors/Destructors in Ada95 Date: 2000/10/19 Message-ID: <39EF5431.BF4CD793@bigfoot.com>#1/1 X-Deja-AN: 683526968 Content-Transfer-Encoding: 8bit References: <39EE160D.F0A2000@bigfoot.com> X-Accept-Language: fr, en-US, en Content-Type: text/plain; charset=iso-8859-1 X-Complaints-To: abuse@proxad.net X-Trace: nnrp6.proxad.net 971985810 212.27.38.226 (Thu, 19 Oct 2000 22:03:30 CEST) Organization: Guest of ProXad - France MIME-Version: 1.0 NNTP-Posting-Date: Thu, 19 Oct 2000 22:03:30 CEST Newsgroups: comp.lang.ada Date: 2000-10-19T00:00:00+00:00 List-Id: tmoran@bix.com a �crit : > > lack of support for Constructors/Destructors directly in the language. > What do you feel missing from Ada.Finalization? No one can give me pointers to the true sources? I did not want to start arguing over this question in a newsgroup. My English output flow is not sufficient to sustain long debates. To Ted Dennison, I will say that before I dared to go out on the net, I looked at my in-house documentation. That is the one you can find with the gnat rpms for Linux made by J�ergen Pfeiffer (arm, rationale and Ada style guide). This WHY question is the exception to the rule that every WHY question has an answer in the rationale. grep -il constructor /usr/share/ada/html/rat95html-1.07/* /usr/share/ada/html/rat95html-1.07/rat95-p3-a.html /usr/share/ada/html/rat95html-1.07/rat95-p3-g.html Two non relevant answers. $ grep -il destructor /usr/share/ada/html/rat95html-1.07/* No answer at all. To Marin David Condic, I will say that I went to his web site and that his constructor does not respect the Ada style guide which states: "Avoid declaring a constructor as a primitive abstract operation." Constructors are a pain to inherit. To Tom Moran, I will say that the problem in the Ada.Finalization package is the Initialize procedure. The procedures Adjust and Finalize do not cause any problems. But the Initialize procedure does not respect the Ada style guide for the same reason as above. The Initialize procedure is inherited. And worst, besides the object itself to initialize, there are no other parameters passed to initialize the object. It is like if in C++, all classes were forced to have a default constructor and the instances were first initialized to useless values. That's why the Ada style guide goes on to state: "Consider splitting the initialization and construction of an object."