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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,18f7f6e041b3e0bf X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-02 04:37:14 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.cis.ohio-state.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!dialin-145-254-047-227.arcor-ip.NET!not-for-mail From: Dmitry A.Kazakov Newsgroups: comp.lang.ada Subject: Re: Dispatching and generics - language lawyer question Date: Sat, 3 Aug 2002 01:42:02 +0200 Message-ID: References: <1028219309.986605@master.nyc.kbcfp.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-047-227.arcor-ip.net (145.254.47.227) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: fu-berlin.de 1028288159 37152918 145.254.47.227 (16 [77047]) User-Agent: KNode/0.4 Xref: archiver1.google.com comp.lang.ada:27608 Date: 2002-08-03T01:42:02+02:00 List-Id: Hyman Rosen wrote: > Dmitry A.Kazakov wrote: >> I think that (1) would cause many problems with MI. When tag is a part of >> the value and then view conversions are problematic. >> There is also redispatch which is IMO incompatible with (1). I think >> redispatch must be removed, because when object identification is really >> necessary (to redispatch) one could use a solution similar to J.-P. Rosen >> trick. > > C++ uses (1), storing multiple "tags" (actually, virtual > table pointers) in the object if necessary, and supports > redispatch just fine. The scheme used by the new version > of g++ is described at > . So in C++ int will never be a class, worse to C++. > I doubt that the language designers, assuming they do add > MI to Ada, would be so silly as to deliberately choose to > implement it in a way that could never be compatible with > C++ object layout. I do not think that to repeat others faults is a good idea. As long as we have no C++ operating system APIs (shudder), I doubt that it is worth effors to keep objects Ada and C++ compatible. To communicate with C++ one could declare a simple record type with fields reserved for places where vtptrs are. -- Regards, Dmitry Kazakov www.dmitry-kazakov.de