15 ms·
I remember really bumping up against this learning OCaml in college after having experienced oodles of imperative programming. I understand the sort of philoso
by rtpg 4mo ago
I remember really bumping up against this learning OCaml in college after having experienced oodles of imperative programming.
I understand the sort of philosophy and ergonomics of not having an early return, but it really does hurt certain kinds of code that otherwise would be more readable
- orthoxerox 4mo ago> ergonomics of not having an early return I wonder who came up with this idea first. I find obvious early returns incredibly ergonomic.
- voidUpdate 4mo agoWikipedia says that "guard clause" was a term invented by Kent Beck, but that the actual practice was used since at least the early 60s
- orthoxerox 4mo agoNo, I meant the idea that guard clauses are antipatterns and your subroutine should have a single implicit return.
- voidUpdate 4mo agoSorry, I misread. Need more coffee