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!feeder.news-service.com!news.k-dsl.de!newsfeed.straub-nv.de!open-news-network.org!noris.net!newsfeed.arcor.de!newsspool4.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> <5cljc8pc0gv0$.115t79rxo29vs$.dlg@40tude.net> <9ad8b242-fe4c-4871-8c0e-1f1ddec936c7@w31g2000yqb.googlegroups.com> Date: Thu, 29 Jul 2010 16:40:33 +0200 Message-ID: NNTP-Posting-Date: 29 Jul 2010 16:40:32 CEST NNTP-Posting-Host: eab299c6.newsspool2.arcor-online.net X-Trace: DXC=T2`jklmYQU7L2C_`koXfC5A9EHlD;3Yc24Fo<]lROoR18kF7enW;^6ZC`4\`mfM[68DC3 On Thu, 29 Jul 2010 07:02:25 -0700 (PDT), Maciej Sobczak wrote: > On 29 Lip, 10:03, "Dmitry A. Kazakov" > wrote: >> You are free to disagree > I do. I know. >>> 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. > > First: C++ standard places no constraints on how the implementation is > organized at the system level. What are you trying to say by this? > Second: so, I understand, "the back-end tools down to the linker and > loader" were more suitable to do it in Ada, right? You mean shared Ada generic bodies? Yes they require much less late binding than C++ templates would, if anybody came to a silly idea to compile and then share them. >>> Interestingly, macros cannot use this strategy by their definition. >> >> They perfectly can. > > No. 2.1 (C++ standard) defines the phases of translation - macro > expansion is performed before syntactic and semantic analysis of > tokens. 1. My example of shared macros was MACRO-11. 2. The standard does not put any requirements on how the compiler actually works. Precompiled headers and IDEs with "go to the declaration point" for a #define, or just showing the source, not yet expanded, code, even daring to colorize it, do not take this advise literally. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de