Hacker News new | past | comments | ask | show | jobs | submit login

Haskell's type system is crafted for Haskell and core.typed is crafted for Clojure. I don't see how they can be compared given how different the two languages are.



I'd say it the other way round: that Haskell was crafted for Haskell's type system, i.e. Hindley-Milner.

(Although Haskell also has type-classes which make my statement not quite true)


I'd say your statement is not true, type classes arrived early on and adjustments needed to made. I imagine adjustments will continue to be made as Haskell evolves as a language.

It is true that Haskell & its type system evolve together whereas core.typed must follow Clojure wherever it may go.


Mmm, and Haskell added higher-kinded types which are not part of Hindley-Milner, so yes my initial statement was too simplistic.


well, they still can be compared at some level. For example, haskell type checker is turing complete, i.e. you can do type level computation (see http://www.haskell.org/haskellwiki/Type_arithmetic)


turing complete, i.e. you can do type level computation

Turing completeness → computation, but the converse is not valid (i.e. computation → Turing completeness is not necessarily true). e.g. GADTs allow for some amount of type-level computation, but they do not in and of themselves form a Turing complete system.

Alas, looking at your link, it does seem that Haskell's type system is sadly Turing-complete.


Only if you use some extensions.

http://www.haskell.org/haskellwiki/Type_SK


correct, "turing complete, i.e. you can do any possible computation at the type level."

I don't know if I feel joy or sadness, but I have the feeling that if type level computation is allowed, then it's better to be turing complete than falling short while giving the illusion to be useful.

As for the practical applications of a powerful type system, I know about this (but I would be interested into finding more examples, as most of the information about that is very theoretical):

http://hackage.haskell.org/package/HList (http://userpages.uni-koblenz.de/~laemmel/TheEagle/dl/Kiselyo...)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: