How Would You Separate Pure and Impure Code

Here is my naive observation.

Given the facilities that Elixir (Erlang) possesses, why not simply stick the logger in it’s own process and let it take the “responsibility and risks of logging” on its own terms. Technically sending that message is a “side effect” but for example in the Clojure community it is emphasized that there the benefits of functional programming aren’t realized via monads but because functional programming allows you to “push [mutable state and complexity] to the edge of the system” (twitter).

Topic:

2 Likes