2 ms·
Along similar lines, see also "Improve your code by separating mechanism from policy" https://lambdaisland.com/blog/2022-03-10-mechanism-vs-policy https://lambd
by svat 3y ago
Along 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.)