11 ms·
Clojure strongly encourages referential transparency (e.g. immutable data structures), but doesn't demand it (e.g. STM). The convention is simply to mark any fu
by adambard 13y ago
Clojure strongly encourages referential transparency (e.g. immutable data structures), but doesn't demand it (e.g. STM). The convention is simply to mark any function with side-effects with a !, which almost all external libraries follow.
Without the !, you can have some confidence that a given function is pure, since pure functions are sort of the "default".
- platz 13y agoRuby follows this convention too, I believe; but probably to a lesser extent because it's core types aren't immutable