Patrick Dubroy
@dubroy
I like this little piece of advice from matklad: "Push Ifs Up and Fors Down"

matklad.github.io/2023/11/15/pus…
Tweet image Tweet image
Aug 31, 2024 · 15 · 1

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…
Tweet image

https://twitter.com/dubroy/status/1829913197236646320 ∙ Archived on 2025-03-28.

← Twitter Archive: 2024