2 ms·
The main benefit of "free monads" and "extensible effects" is that every piece of side-effecting code comes with a convenient way to substitute your own effect
by cousin_it 11y ago
The main benefit of "free monads" and "extensible effects" is that every piece of side-effecting code comes with a convenient way to substitute your own effect handlers. For example, you could capture all I/O from a function and redirect it somewhere else, or intercept every time the function touches a global variable, etc. And you could do it cleanly, in a way that's enforced by the language. I think that's pretty exciting.