comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Sharing generic bodies across instantiations.
Date: Thu, 29 Jul 2010 10:03:59 +0200
Date: 2010-07-29T10:03:59+02:00	[thread overview]
Message-ID: <5cljc8pc0gv0$.115t79rxo29vs$.dlg@40tude.net> (raw)
In-Reply-To: 22db743d-ef73-40fe-886d-9730a2763eaa@c10g2000yqi.googlegroups.com

On Wed, 28 Jul 2010 12:48:57 -0700 (PDT), Maciej Sobczak wrote:

> On 28 Lip, 15:16, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
> 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



  reply	other threads:[~2010-07-29  8:03 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-27  0:51 Sharing generic bodies across instantiations Peter C. Chapin
2010-07-27  3:01 ` Gene
2010-07-27  6:55 ` AdaMagica
2010-07-27 11:29   ` Ludovic Brenta
2010-07-27 14:10     ` Tero Koskinen
2010-07-27 10:51 ` Martin
2010-07-27 20:06 ` anon
2010-07-27 22:23   ` Peter C. Chapin
2010-07-28  7:59     ` Maciej Sobczak
2010-07-28  9:28       ` Dmitry A. Kazakov
2010-07-28 12:55         ` Maciej Sobczak
2010-07-28 13:16           ` Dmitry A. Kazakov
2010-07-28 19:48             ` Maciej Sobczak
2010-07-29  8:03               ` Dmitry A. Kazakov [this message]
2010-07-29 14:02                 ` Maciej Sobczak
2010-07-29 14:40                   ` Dmitry A. Kazakov
2010-07-29 20:27                     ` Maciej Sobczak
2010-07-30  9:09                       ` Dmitry A. Kazakov
2010-07-30 12:31                         ` Maciej Sobczak
2010-07-30 14:59                           ` Dmitry A. Kazakov
2010-08-03  3:02                           ` Randy Brukardt
2010-08-03 14:37                             ` Robert A Duff
2010-08-03  2:47                         ` Randy Brukardt
2010-07-28 20:01             ` Keith Thompson
2010-07-29  7:46               ` Dmitry A. Kazakov
2010-07-28 11:27       ` Peter C. Chapin
2010-07-28 13:10         ` Maciej Sobczak
2010-07-28 16:32           ` Peter C. Chapin
2010-07-28 19:30             ` Robert A Duff
2010-07-28 20:03             ` Maciej Sobczak
2010-07-28 11:47     ` anon
2010-08-03  2:38     ` Randy Brukardt
2010-08-03 14:31       ` Robert A Duff
2010-07-28  0:55   ` Keith Thompson
2010-07-28  8:42     ` Markus Schoepflin
2010-07-28 11:16     ` anon
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox