A Perspective on D from game industry

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 17 23:59:46 PDT 2014


On Wednesday, 18 June 2014 at 06:28:16 UTC, c0de517e wrote:
> So I'm curious, do you think certain concepts went too far, 
> that we should educate against some hypes and abuses, or you 
> think that it's just my very partial view of the world and if 
> looking at the C++ community at large, template metaprogramming 
> is not abused?
>

Everything is a cost/benefit ratio. In C++, template are very 
complex beasts, and because of things like SFINAE, small errors 
can backfire quite badly.

In D, template are both simpler and more capable. It is therefore 
rational to used them more in D than in C++. The cost benefit 
equilibrium is at a different place.

I agree that template are overused in some C++ codebase. On the 
contrary, I would probably use even more template if I had to 
port such code in D.


More information about the Digitalmars-d mailing list