A Perspective on D from game industry

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sun Jun 15 12:51:12 PDT 2014


On 6/15/2014 6:50 AM, Peter Alexander wrote:
> The fear of meta programming comes from Boost, and rightly so in
> my opinion. Boost is written with the assumption that users will
> never have to read its source code. When it comes to debugging
> and performance tuning however, that assumption is shattered.

For years I avoided C++ templates (even though I implemented them in DMC++) 
because they were just so dang hard to read. D originally was not going to have 
templates for that reason.

But I eventually discovered that hiding behind the complexity of C++ templates 
was a very simple idea - templates are just functions with compile time rather 
than run time arguments. (Isn't it amazing that I could implement C++ without 
figuring this out? I still don't understand that.) That was the enabling 
breakthrough for D templates.

In fact, templates engender such an "OMG! Templates! I don't get Templates!" 
aura about them that I convinced Andrei to not even use the word "template" in 
his book about D!




More information about the Digitalmars-d mailing list