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,7f2ce8bda9cae4ab X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!news.octanews.net!ash.uu.net!spool.news.uu.net!not-for-mail Date: Wed, 19 May 2004 09:44:24 -0400 From: Hyman Rosen User-Agent: Mozilla Thunderbird 0.5 (Windows/20040502) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: "Must instantiate controlled types at library level." Why? References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Message-ID: <1084974265.36615@master.nyc.kbcfp.com> Cache-Post-Path: master.nyc.kbcfp.com!unknown@nightcrawler.nyc.kbcfp.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1084974265 27706 204.253.250.10 Xref: controlnews3.google.com comp.lang.ada:686 Date: 2004-05-19T09:44:24-04:00 List-Id: Georg Bauhaus wrote: > Then what will help an Abstract Datatype? How? It's Kazakov's post, so you should know the answer by now :-) He wants ADTs to be implemented using an inherited interface but to keep the virtual table pointer (or other implementation) separate from the objects by implementing fat pointers which combine the address of the object and the address of the vtable. In this way, he hopes that the code generative power of knowing the explicit types involved in an operation can combine cleanly with the expressive power of OO polymorphism. He is both encouraged and discouraged by the distinction Ada makes between classwide types and regular types because this comes tantalizingly close to implementing his vision, unlike in C++ where this is intertwined with parameter passing semantics of by-reference or by-value.