D vs C++

Caligo iteronvexor at gmail.com
Mon Dec 27 08:01:13 PST 2010


On Mon, Dec 27, 2010 at 7:20 AM, Jonathan M Davis <jmdavisProg at gmx.com>wrote:

> On Monday 27 December 2010 04:41:37 spir wrote:
> > On Sun, 26 Dec 2010 12:06:04 -0800
> >
> > Walter Bright <newshound2 at digitalmars.com> wrote:
> > > 11. generative programming
> >
> > Does someone have a pointer to any kind of doc about this? (in D)
>
> Anything on templates, template mixins, and string mixins. All of them
> generate
> code. And some people have done some pretty crazy stuff with them
> (especially
> string mixins).
>
> - Jonathan M Davis
>

So is it like template metaprogramming in C++?  a small D example would be
helpful.  There doesn't seem to be anything about it in TDPL.

As for CTFE, does this mean I could call 'writeln()' at compile time and
have it print a message to stdout while compiling?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20101227/db97b47b/attachment.html>


More information about the Digitalmars-d mailing list