Monday, May 21, 2007

Advanced Topics in Programming Languages Series: Parametric Polymorphism - Google Video

Advanced Topics in Programming Languages Series: Parametric Polymorphism - Google Video

Ok, so the type system is isomorphic to code.
So you CAN generate code from a type specification.
The REAL issue is that the two systems are just isomorphic, you cannot map elements of each one uniquely between each other, as in: there are many functions that map one onto the other.

Lennart Augustsson built Djinn, which is a code generator that takes as input type speciffications.
for things like
f: a -> a # the id on types djinn produces:
f x = x # the id function.

And now suppose that all types have a constant nil.

This could just as easily produce a function as:
f x = nil

The types are consistent, but it's really just plain old stupid.

He does some nice things there. MUST check it out!

http://lambda-the-ultimate.org/node/1178

http://permalink.gmane.org/gmane.comp.lang.haskell.general/12747

http://www.augustsson.net/Darcs/Djinn/

0 Comments:

Post a Comment

<< Home