Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Typed Clojure in Theory and Practice [pdf] (ambrosebs.com)
83 points by tosh on Aug 17, 2018 | hide | past | favorite | 6 comments


What's the difference between optional systems and gradual systems?


The author of Typed Clojure has done a presentation on that subject. https://www.youtube.com/watch?v=yG9CffLlXx0 So if I understood correctly: An optional type system can be toggled at any time but the type checking requires type annotations on all of your code (with all its dependencies). A gradual type system is also optional but can check portions of your program even if they call into un-typed portions of your program and also check typed code called from un-typed code.


The first footnote (numbered 1) in the PDF defines these terms.


I'm embarrassed now.


I wonder if there could be any opportunity to integrate this more with Spec. There seems to be at least some overlap between Typed Clojure and Spec. I could imagine that it would be cool if you could annotate your functions using one way and have some specs be validated statically.


Related but in the opposite direction, static checking of specs: https://github.com/arohner/spectrum (I haven't tried it personally)




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: