What's wrong with D's templates?

retard re at tard.com.invalid
Sun Dec 20 10:04:48 PST 2009


Sun, 20 Dec 2009 18:53:56 +0100, Lutger wrote:

> I'm not sure, I don't think so. From what I understand, duck typing is
> supposed to be dynamic, while structural and nominative typing are part
> of a static type system. I meant the non-nominative kind of typing,
> whatever it is.
> 
> fwiw, this is what wikipedia says:
> 
> "Duck typing is similar to but distinct from structural typing.
> Structural typing is a static typing system that determines type
> compatibility and equivalence by a type's structure, whereas duck typing
> is dynamic and determines type compatibility by only that part of a
> type's structure that is accessed during run time."
> 
> http://en.wikipedia.org/wiki/Duck_typing#Structural_type_systems

You don't need a named interfaces in structural type system. Only the 
members of the data type have any meaning.



More information about the Digitalmars-d mailing list