Hacker News new | ask | show | jobs
by macabeus 2372 days ago
Yeah. We need to ensure that we have a handler to catch the effect (there is an issue about that: https://github.com/macabeus/js-proposal-algebraic-effects/is...)

For user, it could be useful to separate what from the how. For example, we could have a function that launches effects to manipulate the file system, and for test/mock purpose we could catch this effects with handlers that mock the file system.

I know that the pattern dependency injection solve the same problem, but with effects you could do it with a more natural code.