News for hackers. Stuff that matters.

Ask HN: any type theory book recommendation?

After spending some time with Haskell, I was considering diving into some more type theory. Any recommendation for the good type theory book?

I know about Pierce's "Types and Programming Languages" and "Advanced Topics in Types and Programming Languages" but would like to learn whether there are any comparable alternatives.

Thanks in advance!

( 14 comments | 17 points | on HN )
Re:Ask HN: any type theory book recommendation? by alexk7 on Sunday March 28, 2010 @12:44PM (#1224821)
I didn't read any type theory book but I'm interested in the subject. I think I will buy Pierce's "Types and Programming Languages" based on the recommendations on this thread: http://lambda-the-ultimate.org/node/492
Re:Ask HN: any type theory book recommendation? by smikhanov on Sunday March 28, 2010 @01:14PM (#1224872)
Really great thread, thanks for pointing that out
Re:Ask HN: any type theory book recommendation? by tomstuart on Sunday March 28, 2010 @01:14PM (#1224871)
I strongly recommend "Proofs and Types" (http://www.PaulTaylor.EU/stable/Proofs%2BTypes.html), which has the added advantage of being free.
Re:Ask HN: any type theory book recommendation? by smikhanov on Sunday March 28, 2010 @01:18PM (#1224880)
Thanks, added to the bookmarks. Alongside with the one I found earlier http://www.cs.kent.ac.uk/people/staff/sjt/TTFP/ttfp.pdf, this book seem to cover not the type theory per se, but the mathematics that make its foundations. This is great, though not exactly what I'm looking for.
Re:Ask HN: any type theory book recommendation? by tomstuart on Sunday March 28, 2010 @01:22PM (#1224886)
It depends what you mean by "type theory", but you're right. See Pierce for a more practical introduction. "Proofs and Types" is more fundamental and focuses on the interplay between the operational semantics of the underlying language and the structure of its type system (read as proofs of properties of programs written in the language).
Re:Ask HN: any type theory book recommendation? by steveklabnik on Sunday March 28, 2010 @01:07PM (#1224861)
I personally read "Category Theory for Computer Scientists." - http://www.amazon.com/Category-Computer-Scientists-Foundatio...

It was pretty rough. Reactions by page:

1-2 "This is pretty easy." 3-5 "Okay, I can see how this is getting harder..." 6-... "My mind is blown."

The real difficulty is that it dives into mathematical notation that I'm not used to reading fairly quickly. I'm still slogging away at it in my spare time.

Re:Ask HN: any type theory book recommendation? by chriseidhof on Sunday March 28, 2010 @02:10PM (#1224972)
I've only read Pierce, and it's good. As an alternative, you could look at dependent types if you want to know more about types. Dependent types are like GADTs on steroids. A good place to start is Agda (http://wiki.portal.chalmers.se/agda/) or Idris (http://www.cs.st-andrews.ac.uk/~eb/Idris/).
Re:Ask HN: any type theory book recommendation? by ekiru on Sunday March 28, 2010 @06:41PM (#1225372)
The resident type theorist at a college I was considering attended recommended Luca Cardelli to me when I asked about good introductory texts: http://www.eecs.umich.edu/~bchandra/courses/papers/Cardelli_...
Re:Ask HN: any type theory book recommendation? by tophercyll on Sunday March 28, 2010 @12:45PM (#1224822)
Chapter 7 of Essentials of Programming Languages (EoPL) has a nice introduction to some basic topics including type checking and type inference.

It's a nice gradual introduction, and help me get started with TaPL (although I wish I could say I'd made much progress).

Re:Ask HN: any type theory book recommendation? by gtani on Sunday March 28, 2010 @12:43PM (#1224819)
This study groups is using the out of print Barr/wells, which I couldn't find for purchase

http://groups.google.com/group/bacat/topics?start=

Re:Ask HN: any type theory book recommendation? by pushout on Sunday March 28, 2010 @03:27PM (#1225084)
You should purchase the third edition of Barr & Wells directly from the publisher. Centre de Recherches Mathematiques. http://www.crm.umontreal.ca/pub/Collections/desc/PM023.html
Re:Ask HN: any type theory book recommendation? by enum on Sunday March 28, 2010 @01:56PM (#1224943)
"Practical Foundations of Programming Languages", available online:

http://www.cs.cmu.edu/~rwh/plbook/book.pdf

Re:Ask HN: any type theory book recommendation? by leif on Sunday March 28, 2010 @02:57PM (#1225041)
I believe http://www.cs.nott.ac.uk/~gmh/cat.html was on HN sometime in the last two weeks. It's a very very good introduction to the underlying mathematical structures Haskell uses for its type system.
Re:Ask HN: any type theory book recommendation? by stralep on Sunday March 28, 2010 @09:04PM (#1225543)
Programming in Martin-Löf's Type Theory http://www.cs.chalmers.se/Cs/Research/Logic/book/

I'm reading it from time to time. Useful for me.