48 hour game jam

so so at so.so
Mon Oct 15 10:19:42 PDT 2012


On Monday, 15 October 2012 at 16:37:08 UTC, Peter Alexander wrote:
> ...
> - Simple(r) templates

I keep seeing things like this and probably i am failing to 
understand it.
This is a vast understatement for D templates. Yes, easier to 
use, i agree.
But C++ templates are stone age comparing to D and i don't see 
this mentioned enough where it matters most. It was there in 
recent reddit discussions too. I am reading those comments (some 
posters obviously have some kind of agenda) and seeing no one 
refuting them. They neither know C++ well enough to do 
metaprogramming nor D. Because if they did know, they would never 
bring templates into any discussions which involves C++/D 
comparison.

Comparing to C++.

* D templates easier to use.
* There are constructs you can't just do templates without. 
(templates without "static if" is c without "if")
* Some things possible (string/float/alias/... arguments) because 
there is no C++ way of doing these.
* Some things possible in practice (there are things you can 
achieve with C++ templates but they are practically impossible)
* You can have all these and able get higher performance.

There are probably more of those i just can't remember now.


More information about the Digitalmars-d mailing list