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,CP1252 X-Google-Thread: 103376,fba93c19bb4e7dbd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-18 22:48:24 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!wn12feed!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!rwcrnsc53.POSTED!not-for-mail Message-ID: <3F18DB9D.5020205@attbi.com> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Q: Endless loop by dispatching References: <3F188FDA.3000202@attbi.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 66.31.71.243 X-Complaints-To: abuse@comcast.net X-Trace: rwcrnsc53 1058593703 66.31.71.243 (Sat, 19 Jul 2003 05:48:23 GMT) NNTP-Posting-Date: Sat, 19 Jul 2003 05:48:23 GMT Organization: Comcast Online Date: Sat, 19 Jul 2003 05:48:23 GMT Xref: archiver1.google.com comp.lang.ada:40496 Date: 2003-07-19T05:48:23+00:00 List-Id: tmoran@acm.org wrote: > 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. No I believe that having TWO dispatching operations named Initialize, and which one is called depends on whether the call is implicit or explicit is potentially confusing to users. The same effect occurs if you have two objects with default initializations, and the one in the package spec calls one version of Initialize, and the one in the package calls a different Initialize. This as I said was a small program to demonstrate where the people on both sides of the discussion weren't "getting it." I wanted to demonstrate that even if everyone did have the identical understanding of the overridding rules, these funny cases do exist. (Remember the part about users shooting themselves in the foot.) And in the worst cases, the point at which the overriding occurs does affect run-time behavior. The fact that I tripped over a case where compilers disagree tells us (the ARG) two things: 1) There is definitely a problem. 2) If it was a serious problem, users would have already run into it. I can't testify that users hadn't tripped over it before, but now it is definitely out in the open. Which rule do you prefer: 1) All objects of a type derived from Ada.Finalization.Controlled by default call the same version of Initialize? or 2) Information hiding in effect AT THE PLACE OF THE CALL can determine which version of a subprogram is called? If you vote for 2), I won't argue, I'll take it as data. The important part for the ARG is that in this (foot shooting) case we have to choose. The two alternatives are clearly incompatible, and that is what the program was written to demostrate. -- Robert I. Eachus �In an ally, considerations of house, clan, planet, race are insignificant beside two prime questions, which are: 1. Can he shoot? 2. Will he aim at your enemy?� -- from the Laiden novels by Sharon Lee and Steve Miller.