Ask HN: Learning about Type Systems

Hi,

I've been a Python / Javascript programmer for a long time and just last week started learning OCaml after listening to a podcast. OCaml has been great and I'm really loving the strong typing and bugs the compiler spews out before runtime. On HN I've repeatedly read people debating about Type systems and comparing them in different languages. I would love to advance my knowledge on the area! Are there any beginner books on Type Systems that helped you in the grokking the subject?

Thanks!

  • http://www.cis.upenn.edu/~bcpierce/sf/current/index.html

    Check out Software Foundations. It's a pretty gentle bridge from programming into the theory side. You do programming exercises in Coq. If you already know basic OCaml, the programming side of Coq will seem very familiar. I can't recommend SF highly enough.

    gkuan's recommendations are good regular books. They might be a little more than you're looking for.

  • Bob Harper's _Practical Foundations for Programming Languages_ is a good starting point and from there I would go on to Benjamin Pierce's _Types and Programming Languages_.

  • Search for "static dynamic" on Programmers.SE (the general consensus there is that static typing is superior for most tasks):

    http://programmers.stackexchange.com/questions/16/do-dynamic...

  • For me it was just the experience with both. Coming from Java background it was exactly the opposite when I was first dynamic languages, but it got easier eventually (quickly).

    I guess you just have to try out different approaches (and mixed ones, Dart and ActionScript come to mind) and gradually understand benefits of each way.

  • I haven't worked through it yet, but I've heard Benjamin Pierce's Types and Programming Languages (TAPL) is one of the go to books on the topic.

    http://www.cis.upenn.edu/~bcpierce/tapl/

  • Which podcast?