What's wrong with D's templates?

BCS none at anon.com
Sun Dec 20 10:12:37 PST 2009


Hello Lutger,

> Yigal Chripun wrote:
> 
>> The .Net implementation isn't perfect of course and has a few issues
>> that should be resolved, one of these is the problem with using
>> operators. requiring interfaces by itself isn't the problem though.
>> The only drawback in this case is verbosity which isn't really a big
>> deal for this.
>> 
> The drawback is not verbosity but lack of structural typing. Suppose
> some  library has code that can be parametrized by IFoo and I have
> another library with a type that implements IBar, which satisfies IFoo
> but not explicitly so.

Fully compile-time duck typeing. Thats the one of the things I must demand 
be kept.





More information about the Digitalmars-d mailing list