Template constraints in D

Walter Bright newshound1 at digitalmars.com
Sat Jun 21 12:45:30 PDT 2008


Ary Borenszweig wrote:
> For me, this is the big difference between them:
> 
> Semantic analysis of template bodies:
>  - D: Lazy (done at instantiation time)
>  - C++0x: Eager (done at definition time)
> 
> I want to get errors in the template itself, not just know that I've 
> done something wrong in my template when some user discovers a bug in 
> it.

I discussed this with Douglas Gregor, the primary inventor of concepts. 
It boiled down to, how likely is it that one would ship a template that 
had never been instantiated, and is that a big enough feature that it 
needs language support?

> This will also enable IDE support for templates.

I don't see how that is required for IDE support.



More information about the Digitalmars-d mailing list