Understanding Templates: why can't anybody do it?

Philippe Sigaud philippe.sigaud at gmail.com
Mon Mar 19 13:08:08 PDT 2012


On Mon, Mar 19, 2012 at 20:37, H. S. Teoh <hsteoh at quickfur.ath.cx> wrote:
>
> It would be nice if somebody could write up a general introduction to
> the idea of templates (not specific to D), the motivations behind it,
> perhaps some historical background, and then eventually lead up to
> advanced template tricks using D as the prime example.
>
> Then not only we can point newbies at the document, but it can also
> serve as D propaganda.
>
> I'd take a stab at this, except that my free time is limited and most of
> it is currently being used for refining my AA implementation so that it
> can (hopefully) replace the current AA mess.

As Ali said, there is a chapter of his D book about templates:

http://ddili.org/ders/d.en/templates.html


And I wrote a document on templates (I call it a tutorial):

https://github.com/PhilippeSigaud/D-templates-tutorial/blob/master/dtemplates.pdf

I saw someone said it skips too fast to over the easy stuff. Should I
say more on the first chapters?


More information about the Digitalmars-d mailing list