Hey,
I have had finally the time to prototype an idea I had for over a year:
https://github.com/whilo/beichte
It is only a first prototype, but the basic mechanics work fine, i.e. it
is doing a deep recursive walk through your Clojure codebase (everything
that is on the classpath or filesystem) and tracks down impure var
accesses. I would like to get feedback of what you think about this and
would like see integrated if this becomes a linter.
I am thinking in the direction that you have to declare your vars as
impure explicitly, either by adding a "!" at the end of the function
name or by some metadata on vars (opt-out purity). This would allow you
to go as far as Haskell does in regard to enforcing purity without using
the type system and monads for it. This is not meant as a criticism of
Haskell, rather as a disentanglement of purity from the type system.
There will be a considerable effort needed in assigning purity to core
classes and methods and maybe also beyond Clojure to core libraries, but
maybe somebody has some ideas of how to ease this process(?).
Best,
Christian