3 ms·
If you haven't seen it, it's worth checking out Gary Bernhardt's "Functional Core, Imperative Shell" stream, which gets into how to apply this idea. https://www
by cdcarter 3y ago
If you haven't seen it, it's worth checking out Gary Bernhardt's "Functional Core, Imperative Shell" stream, which gets into how to apply this idea. https://www.destroyallsoftware.com/screencasts/catalog/functional-core-imperative-shell https://www.destroyallsoftware.com/screencasts/catalog/funct...
- svat 3y agoAlong similar lines, see also "Improve your code by separating mechanism from policy" https://lambdaisland.com/blog/2022-03-10-mechanism-vs-policy https://lambdaisland.com/blog/2022-03-10-mechanism-vs-policy The connection between all three is to put the "pure" / "mechanism" / "functional" code in middle, and the "impure" / "policy" / "imperative" code on the outside. (The concepts are not identical, but there is substantial overlap.) (There is also some overlap with John Ousterhout's A Philosophy of Software Design idea of "deep modules": don't put policy stuff, i.e. arbitrary decisions, inside the module.)
- bafe 3y agoIsn't this in essence the idea behind effects systems, where you reify side effects, manipulate them as values and execute them "at the edge" of your program?