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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,43aafc250d42730f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-09 03:05:02 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!195.25.12.36!oleane.net!oleane!nnrp.oleane.net!skymaster.axlog.fr!nobody From: "Jean-Pierre Rosen" Newsgroups: comp.lang.ada Subject: Re: controlled type in generic package? Date: Fri, 9 Feb 2001 09:51:25 +0100 Organization: Adalog Message-ID: References: <3A7FDA9A.C667090F@stn-atlas.de> <95p2ab$463$1@nnrp1.deja.com> <95q1fa$9e$1@usenet.rational.com> <95rpj5$gq7$1@nnrp1.deja.com> <95sjs9$ral$1@wanadoo.fr> <95tpba$9va$1@nnrp1.deja.com> NNTP-Posting-Host: mailhost.axlog.fr X-Trace: s1.read.news.oleane.net 981716401 8458 195.25.228.57 (9 Feb 2001 11:00:01 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Fri, 9 Feb 2001 11:00:01 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: supernews.google.com comp.lang.ada:5053 Date: 2001-02-09T09:51:25+01:00 List-Id: a �crit dans le message news: 95tpba$9va$1@nnrp1.deja.com... >[...] > > procedure P is > > type Child is new Parent with...; > > procedure Proc (X : Child) is... end Proc; > > begin > > V := new Child; > > end P; > > > > This is an issue of how dispatch tables are implemented and maintained > at run-time. One could imagine a mechanism that would restore the > dispatch table, when a derived type goes away. The type tag could > be "redirected" to the base type tag, or the table slots corresponding > to the overriden methods could be restored etc. What is really nasty, > is that the semantic of V.Proc would depend on the context. > No, you miss the point. A (dispatching) call to P.Proc could access P's local variables, but such variables would not exist at the time P.Proc is called. -- --------------------------------------------------------- J-P. Rosen (Rosen.Adalog@wanadoo.fr) Visit Adalog's web site at http://pro.wanadoo.fr/adalog