Moved to https://github.com/kbilsted/Functional-core-imperative-shell/blob/master/README.md
-
-
Save kbilsted/abdc017858cad68c3e7926b03646554e to your computer and use it in GitHub Desktop.
should we convert part of this debate into text somehow? Should I convert this gist to a repo so we can grow this resource together?
(You also get concurrency for free with generators - by yielding an array of promises: https://amphp.org/)
(And another aspect with effects-as-promises is that you can mock the effects instead of the dependencies when designing your tests. The downside being that you bind the test more tightly to your implementation. But there are several upsides as well - e.g. testing only certain types of effects, being able to ignore all effects, and less mocking code.)
should we convert part of this debate into text somehow? Should I convert this gist to a repo so we can grow this resource together?
Dunno. The pattern would have to be tried out in a bigger application, I think, before knowing if it's applicable.
Oh, you already made a repo. Nice. :)
@maletor thanks, essentially you just removed the ability to throw an exception one place and catch in another by marking it an explicit codepath which you need to cater for all the way from your catch-statement down to your throw statement.