| Overall, the work described in this dissertation leads to the conclusion that it
appears to be both practical and useful to design and implement an optional
static type system for the Clojure programming language. I'm a huge type safety fan (see http://roy.brianmckenna.org/) so this is pretty amazing. I'm definitely going to play around with Ambrose's work. Had a quick look, it's really exciting that the algo.monads was almost completely type-checkable with this system. Leaves me with a couple of questions: Multimethods are untyped. Anyone able to comment on how often multimethods are used in idiomatic Clojure code? Anyone know if this work could eventually allow protocols to become full type-classes (allowing dispatch based on return type of protocol methods)? Am I misunderstanding how protocols are compiled? Hopefully the videos for Typed Clojure at Clojure Conj 2012 will be posted soon after the talk is given :) My only fear is that optional typing would be less useful than optional untyping. When you have libraries that are untyped, they're a pain to use from a typed language. The other way around is not true. |
I don't know a lot about type-classes, but I'm doubtful that Typed Clojure could help make protocols like them. I would expect a whole different dispatch system would need to be designed. But that's mostly a hunch. Very interesting problem.
If you want to play around with this kind of stuff immediately, check out Typed Racket. The Typed Clojure implementation is in alpha and might not be very friendly yet :) That said, please try it out!