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-22 07:42:35 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news-feed1.de1.concert.net!fu-berlin.de!uni-berlin.de!tar-alcarin.cbb-automation.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: Q: Endless loop by dispatching Date: Tue, 22 Jul 2003 16:46:41 +0200 Message-ID: References: <3F188FDA.3000202@attbi.com> <3F18DB9D.5020205@attbi.com> <818nhv0hrmlheu622t82574blao7bqr0tt@4ax.com> <3F1BBB9B.2070800@attbi.com> <3F1C360E.8010208@attbi.com> <25pphvct4bsdc5ag0rrnftoitlqgombm25@4ax.com> <3daqhvk2506mngn818ihqlsbl0ss6pd896@4ax.com> NNTP-Posting-Host: tar-alcarin.cbb-automation.de (212.79.194.111) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1058884953 15856381 212.79.194.111 (16 [77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:40641 Date: 2003-07-22T16:46:41+02:00 List-Id: On Tue, 22 Jul 2003 12:18:57 +0000 (UTC), Lutz Donnerhacke wrote: >* Dmitry A Kazakov wrote: >> On Tue, 22 Jul 2003 10:36:56 +0000 (UTC), Lutz Donnerhacke >>>How about a fixing rule, which applies at the private syntax element? >> >> Which rule do you mean? > >If publicly defined tagged types are fixed at the private syntax element, >there is no possibility to define dispatching procedures and functions >afterwards. Of course, it's not a choice, because it will break existing >programs. But what if I need to extend the interface by adding some new primitive operations? Or do you mean some sort of interface freezing like Java's "final"? It will face same problems to be solved: package A is type X is tagged ...; procedure Foo (Obj : X); end A; package B is type XX is new X with ...; procedure Foo (Obj : XX) is final; -- No more overridings end B; package C is type Y is new X with private; procedure Foo (Obj : Y); -- Going to override, can I? private type Y is new XX with ...; -- Oops, I can't! end C; I can only repeat my old thesis: either multiple inheritance allows a reasonable implementation, or there should be no inheritance at all. --- Regards, Dmitry Kazakov www.dmitry-kazakov.de