3 ms·
Can’t you just use type hints (in both clojure or python 3)?
by mvid 8y ago
Can’t you just use type hints (in both clojure or python 3)?
- hellofunk 8y agoThey don't take care of this issue most of the time, and in Clojurescript they are meaningless. In Clojure, only hints on primitive Java types (integer, etc) do something meaningful, so any custom Clojure types or your own "types" have no such checking, and in particular keywords are always valid if they are mistyped which results in a running program with no errors that creates nil and null pointer exceptions and undefined and other things all over the place. It's a tradeoff for using an expressive dynamic language, I guess.
- nickserv 8y agoType hints are not taken into account by the Python interpreter. They do help an IDE like pycharm, but that won't catch all errors.