Re:Ask HN: What change in your programming technique has bee...
by mekster on Friday January 24, 2020 @08:36AM
(#22138041)
Why avoid early returns?
If something doesn't match a condition to process anything in the function, then it's cognitively better to return early and say that case should be left out before possibly doing anything weird in it.
A broader one: writing expressions as much as possible. Basically, it means avoiding unnecessary mutations (and jumps).
Then avoiding architecture. Thinking algorithms that process data (instead of "systems") has been transformative.