I like this little piece of advice from matklad: "Push Ifs Up and Fors Down"
matklad.github.io/2023/11/15/pus…
matklad.github.io/2023/11/15/pus…
Interestingly, Ousterhout's "A Philosophy of Software Design" kind of argues for the opposite, although it's nuanced.
IMO the exact opposite is a better rule of thumb: "push complexity upwards".
See also Functional Core / Imperative Shell: destroyallsoftware.com/screencasts/ca…
IMO the exact opposite is a better rule of thumb: "push complexity upwards".
See also Functional Core / Imperative Shell: destroyallsoftware.com/screencasts/ca…
https://twitter.com/dubroy/status/1829913197236646320 ∙ Archived on 2025-03-28.