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-Thread: 103376,e93f73587e2bc1c3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder2.cambriumusenet.nl!feeder3.cambriumusenet.nl!feed.tweaknews.nl!87.79.20.105.MISMATCH!news.netcologne.de!ramfeed1.netcologne.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Sharing generic bodies across instantiations. Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4c4e2d69$0$2378$4d3efbfe@news.sover.net> <4c4f5c28$0$2375$4d3efbfe@news.sover.net> <7da1e21f-bec7-4607-923c-0fd6cbcfc753@t10g2000yqg.googlegroups.com> <1vjqnwxhvr91j.3e8ryvkk8ezv$.dlg@40tude.net> <1e77bsd66fduw.dbrgbk4g2ce7$.dlg@40tude.net> <22db743d-ef73-40fe-886d-9730a2763eaa@c10g2000yqi.googlegroups.com> Date: Thu, 29 Jul 2010 10:03:59 +0200 Message-ID: <5cljc8pc0gv0$.115t79rxo29vs$.dlg@40tude.net> NNTP-Posting-Date: 29 Jul 2010 10:03:59 CEST NNTP-Posting-Host: 85ba3310.newsspool3.arcor-online.net X-Trace: DXC=Y9CW_cj6]UfEB;5>eE0T7mMcF=Q^Z^V3h4Fo<]lROoRa8kFRT5Kg[6LHn;2LCVn7enW;^6ZC`d\`mfM[68DCcFa[]fA4F8^f X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:12655 Date: 2010-07-29T10:03:59+02:00 List-Id: On Wed, 28 Jul 2010 12:48:57 -0700 (PDT), Maciej Sobczak wrote: > On 28 Lip, 15:16, "Dmitry A. Kazakov" > wrote: > >>> Wrong. Macros have nothing to do with templates. >> >> They have the nature > > We were talking about the nature of templates, not the nature of > macros. Yep, and the point was that templates being by the nature marcos like to be expanded on the source level. You are free to disagree and put any other reason why templates are 99.(9)% expanded. But this one is good to me. >> Interpreter does not qualify as a compiler, > > So the discussion was limited to compilers only? I did not found this > constraint in the original post. It came as Peter tried to define the meaning of a template body being shared. A sound definition would be compiled body. > Even if we assume such a limitation of discussion, there is still > nothing particular in the C++ standard that would prevent code sharing > as an implementation strategy for templates. It would be technically meaningless, because the back-end tools down to the linker and loader were unsuitable for this. > Interestingly, macros cannot use this strategy by their definition. They perfectly can. For example DEC indeed had macro libraries. They were nothing but collections of shared macros. If the strategy were to call MACRO-11 at run time of the library member each time you liked to execute/interpret/expand it, then this could be done. No problem, except that nobody would do that. Why? Because of the nature of macros and templates. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de