What's wrong with D's templates?

Lutger lutger.blijdestijn at gmail.com
Mon Dec 21 03:25:35 PST 2009


Don wrote:

> Lutger wrote:
...
>> http://en.wikipedia.org/wiki/Duck_typing#Structural_type_systems
> 
> That Wikipedia page doesn't any make sense to me. Is that *really* what
> duck typing is? If so, it's a complete misnomer. Because it's totally
> different to "if it looks like a duck, quacks like a duck, etc".
> If it looks like a duck now, but *didn't* look like a duck three minutes
> ago, you can be pretty sure it's NOT a duck!
> 
> Whereas what it calls "structural typing" follows the duck rule
> perfectly. There is no reasoning on that page as to why duck typing is
> restricted to dynamic languages.
> 
> There's far too much ideology in that page, it ought to get flagged as
> inappropriate. Eg this line near the top:
> 
> "Users of statically typed languages new to dynamically typed languages
> are usually tempted to .."
> 

Yes, but most of the (less academic) information on the web about type 
systems is like this. Hence the confusion about basic terms.




More information about the Digitalmars-d mailing list