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,3a9b49a9162025eb X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-16 02:16:03 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!feed.news.nacamar.de!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: "Martin Krischik" Newsgroups: comp.lang.ada Subject: Re: Bye-bye Ada ? (Ada95 Wholesale Changes?) Date: Sat, 15 Feb 2003 16:43:52 +0100 Organization: never organized Message-ID: References: <3E3B7BB5.A1A070@adaworks.com> <3NY_9.9226$x63.6255@nwrddc01.gnilink.net> <3E40A07A.CD174746@adaworks.com> <1044457651.769640@master.nyc.kbcfp.com> <3E42A61C.20905@cogeco.ca> <3E432DD4.7F256C85@adaworks.com> <3E43FA31.9873C5AA@adaworks.com> <3E44A869.DDB2352@adaworks.com> <1045157252.719611@master.nyc.kbcfp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 X-Trace: news.t-online.com 1045390554 06 8694 1nhhE2XTSQAPjh 030216 10:15:54 X-Complaints-To: abuse@t-online.com X-Sender: 05341395658-0001@t-dialin.net User-Agent: Pan/0.13.0 (The whole remains beautiful) Xref: archiver1.google.com comp.lang.ada:34147 Date: 2003-02-15T16:43:52+01:00 List-Id: On Thu, 13 Feb 2003 12:27:32 +0000, Hyman Rosen wrote: > Martin Krischik wrote: >> In fact you can't do this if you want virtual inlines. > > This is totally wrong - you really should learn more C++ > if you are going to make pronouncements about it. Inline > functions don't require any separate definitions for being > called indirectly, whether through the virtual table or by > having their address taken. The compiler takes care of that. Well, let me elaborate on my previous comment. The problem here is that the inline method is not attached to any paricular compilation unit (unlike Ada) but, in worst case need to be elaborated in any compilation unit which includes the inline. Inline is only a hint, the compiler might or might or might not honor it. And most compilers will, of course, optimize here and not elaborate the method when not used. Anyway, the compiler will need a non inlined version to fill the virtual function table. And the virtual function table will be needed wherever the is a contructor. And a contructor might be inline as well or compiler provided. That would mean that the virtual inline might be elaborated hundreds of time - in every compilation unit with a contructor call. With the result that no two virtual function tables will look the same. The problem becomes even more interesting when using DLLs. Some C++ style guides suggest not to use virtual inlines because of it. Some C++ compiler vendors choose not to automaticly elaborate virtual inlines because of it. And the core statement stays: Ada inlines are superior to C++ inlines. With Regards Martin -- Martin Krischik mailto://Martin@krischik.com http://www.martin.krischik.com