Don:

Do you know why this semantics:

> void add(Tulong)(Tulong x)   if ( is(Tulong == ulong) )

Is different from this one?

void add(Tulong:ulong)(Tulong x) {

This page says:
http://www.digitalmars.com/d/2.0/templates-revisited.html
T:int,        // T must be int type
So it seems the same as the version with the template constraint.

Can't the D2 semantics of (Tulong:ulong) be redefined to become the same of the 
version with template constraint if(is(Tulong==ulong)) to remove this special 
case from D?


> Template constraints are seriously cool.

I agree :-) And Andrei has used them a lot in Phobos2.
Thank you for your trick (but but the idea is to have a language that needs as 
few tricks as possible).

Bye,
bearophile

Reply via email to