5 ms·
Clojure encourages functional style code through its immutable data structures and a set of (mostly) referentially transparent functions that operate on them.
by yomly 6y ago
Clojure encourages functional style code through its immutable data structures and a set of (mostly) referentially transparent functions that operate on them.
But clojure is very strictly imperative. Atoms are easily accessible in the stdlib and side effects can be called inline and hidden within functions. This masks IO from a perceived return type.
Haskell differs here because it forces you down the path of "everything explicit" and "everything referentially transparent". Essentially monads emerge as a result of this, but their use definitely feels unergonomic in clojure