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-7-bit X-Google-Thread: 103376,436e4ce138981b82 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-10 12:05:52 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!news.algonet.se!algonet!news-stoc.telia.net!news-stoa.telia.net!telia.net!nntp.inet.fi!inet.fi!ash.uu.net!spool.news.uu.net!not-for-mail Date: Wed, 10 Mar 2004 15:04:43 -0500 From: Hyman Rosen User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: abstract sub programs overriding References: <1078776213.376775@master.nyc.kbcfp.com> <1078839257.157439@master.nyc.kbcfp.com> <5cmr40t76va200betf07b7bd6er05ltto9@4ax.com> <1078845298.702789@master.nyc.kbcfp.com> <0ipr40thtf86b520a0qdi003aj87gtuhd4@4ax.com> <1078849973.701176@master.nyc.kbcfp.com> <1078924150.268074@master.nyc.kbcfp.com> <1078934469.744922@master.nyc.kbcfp.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Message-ID: <1078949096.760629@master.nyc.kbcfp.com> Cache-Post-Path: master.nyc.kbcfp.com!unknown@aphelion.nyc.kbcfp.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1078949096 28987 204.253.250.10 Xref: archiver1.google.com comp.lang.ada:6218 Date: 2004-03-10T15:04:43-05:00 List-Id: Robert I. Eachus wrote: > DK is right DON'T DO THAT So if you really want to So he's not right, because it's not impossible, just very unusual. Anyway, let's see if I understand. You are saying that in Ada, it is unusual to call Parent.Initialize(Parent_Type(Child_Object)) from Child's Initialize. That seems odd to me; how does the child know that the parent can do without this call? If it can be so blithely ignored, what good is having it in the first place? You also say that "It is much more common, however, for such a call to be done for only the parent part of the object, for example when creating a child object using an aggregate." Isn't it the case that when you do that, Child's Initialize won't be called at all? You also say that as a matter of policy, Initialize should not make a dispatching calls because it is likely to be incorrect. That's what C++ avoids by preventing dispatching from going to parts of the final object which are not yet constructed.