What's wrong with D's templates?

retard re at tard.com.invalid
Mon Dec 21 03:56:18 PST 2009


Mon, 21 Dec 2009 12:25:35 +0100, Lutger wrote:

> 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.

The amateur opinions are often pure 100% crap - most ruby/python fanboys 
are just reinventing (NIH) the same wheel academic community already 
invented 50 years ago. Don't trust wikipedia on this.

http://www.pphsg.org/cdsmith/types.html
http://www.reddit.com/r/compsci/comments/9zinc/
what_is_a_dynamic_type_system/

The book discussing type system essentials:

http://www.cis.upenn.edu/~bcpierce/tapl/
http://books.google.fi/books?id=ti6zoAC9Ph8C

Some related discussion:

http://lambda-the-ultimate.org/node/834
http://lambda-the-ultimate.org/node/1102
http://lambda-the-ultimate.org/node/1268
http://lambda-the-ultimate.org/node/2828
http://lambda-the-ultimate.org/node/2418
http://lambda-the-ultimate.org/node/1625
http://lambda-the-ultimate.org/node/1201



More information about the Digitalmars-d mailing list