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-7-bit X-Google-Thread: 103376,fba93c19bb4e7dbd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-18 19:30:18 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc51.ops.asp.att.net.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Q: Endless loop by dispatching References: <3F188FDA.3000202@attbi.com> X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.13.56 X-Complaints-To: abuse@comcast.net X-Trace: rwcrnsc51.ops.asp.att.net 1058581817 12.234.13.56 (Sat, 19 Jul 2003 02:30:17 GMT) NNTP-Posting-Date: Sat, 19 Jul 2003 02:30:17 GMT Organization: Comcast Online Date: Sat, 19 Jul 2003 02:30:17 GMT Xref: archiver1.google.com comp.lang.ada:40494 Date: 2003-07-19T02:30:17+00:00 List-Id: > > What was programmer of Root trying to accomplish when he said > > > >> type Root_Type is tagged private; > > He was trying to demonstrate an obscure point ;) But to rephrase the question: Why would an application programmer write type Root_Type is tagged private; instead of type Root_Type is new Ada.Finalization.Controlled with private; unless he specifically did not want derived types to do their own Initialize et al. As I understand: > -- derived type is known to be tagged but not controlled. > procedure Initialize (Object : in out Derived_Type); -- 2 > ... > Obj : Leaf.Derived_Type; -- Which Initialize gets called? > Leaf.Initialize Called. > > At least GNAT agrees with me. ;-) you and Gnat believe that type Root_Type is tagged private; type Root_Type is new Ada.Finalization.Controlled with private; should be equivalent, right? It seems to me that additional ways to say the same thing are of modest value, while ways to say something different are of greater value, so I would want those two declarations to accomplish different, not the same, things.