Hacker News new | past | comments | ask | show | jobs | submit login

> In a dynamic language, whenever I need to double-check the contract for some code, I can't just go look look at its type signature, I have to go read through it. I have to fully load that whole subtree of information into my brain (recursively to any functions it may itself call), when I'm really trying to focus my thoughts on something else. This can be a huge, needless drain on mental resources.

Yes, this is a headache, and certainly a problem that afflicts Clojure. Spec doesn't really help much in this regard. There is a proper static typing system for Clojure[0] that does provide a lot of the editor integration you speak of, but as I recall it was a little too brittle and orthogonal to Clojure's way of doing things to be as useful as spec. Some of Clojure's core constructs are completely impossible to type statically.

As with everything there are tradeoffs and choices to be made. I've been writing Clojure professionally for 5+ years now and there's no other language I have much interest in dealing with full-time (yet). One has to choose one's poison I suppose.

  [0]: https://github.com/typedclojure/typedclojure



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

Search: