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-Language: ENGLISH,ASCII X-Google-Thread: 103376,23777acd564d513b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-22 07:26:42 PST Message-ID: <3E2EB82A.7080400@epfl.ch> Date: Wed, 22 Jan 2003 16:26:34 +0100 From: =?ISO-8859-1?Q?Rodrigo_Garc=EDa?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Problem Eliminating constructors References: <3e274cad$0$33929$bed64819@news.gradwell.net> <3e2d9f6e$0$33923$bed64819@news.gradwell.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit NNTP-Posting-Host: lglpc31.epfl.ch X-Trace: epflnews.epfl.ch 1043249199 128.178.76.8 (22 Jan 2003 16:26:39 +0200) Organization: EPFL Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.stueberl.de!solnet.ch!solnet.ch!news.imp.ch!news.imp.ch!news-zh.switch.ch!epflnews.epfl.ch!not-for-mail Xref: archiver1.google.com comp.lang.ada:33346 Date: 2003-01-22T16:26:34+01:00 List-Id: Victor Porton wrote: > In article <3E2D3245.2060903@epfl.ch>, > Rodrigo Garc�a writes: > >>>>Victor Porton wrote: >>>> >>> >>>Oh, Rodrigo, I oversimplified the real situation. Initialization with >>>just aggregates is possible only in the example, really I need namely >>>constructor functions. >> >> I see... Have you tried with controlled types? > > > Do you mean to use type discriminants by Initialize procedure? Yes, that's the idea. > I suspect this is a size overhead in current compilers (Gnat 3.14/3.15 > for me). Well, I implemented our simple example with and without controlled types and it is not a significant overhead. In my opinion, the use of controlled types is the only "standard" (and the cleanest) way that Ada proposes for constructors/destructors. Rodrigo