Comparison chart of D and C++ templates

Lutger lutger.blijdestijn at gmail.com
Fri Jan 19 07:24:35 PST 2007


Walter Bright wrote:
> http://www.digitalmars.com/d/template-comparison.html
> 
> Comments?

Informative chart, links to spec and other articles about templates 
might be useful.

Not sure if these belong to the chart, but I find the following features 
   quite valuable with or in conjunction with templates:

- Static assert, a no-brainer.
- Compile time messages, with static assert for example. I guess this by 
virtue of the .mangleof property with compile time string parsing? (I'm 
thinking of Don Clugston's meta.nameof library). Anyway the ability to 
easily give meaningful and readable error messages without resorting to 
compiler output parsing like STLlift can be a big time-saver.
- 'is' expressions
- templated mixins



More information about the Digitalmars-d-announce mailing list