Clojure is an untyped dynamic Lisp-like language that targets the Java virtual machine (JVM). This paper discusses adding a type system to the language. It is based on real-world work, the Typed Clojure project and core.typed library, which are apparently based on ideas from the Racket language.
This paper will be of interest to anyone interested in building a type system for languages similar to Clojure. The authors focus on three aspects of the language: JVM and the challenge of Java nulls, multimethods, and heavy use of heterogeneous maps. Their discussion includes a nice blend of practical issues and theoretical underpinnings. The paper also contains an extensive references section, with 26 citations ranging from 1988 to 2015.
Typed Clojure is based on compile-time type checking. In the active Clojure world, it appears that this approach may be surpassed by run-time verification systems, most recently the clojure.spec library available in alpha versions of Clojure 1.9. I commend the authors of this paper for addressing the challenges faced by the current version of Typed Clojure and acknowledging these “competing” solutions. I look forward to ongoing development as the teams challenge each other to create ever-improving tools.