3 ms·
It's a design pattern that has it's uses. I've written plenty of code which goes through many precondition checks and has to throw appropriate errors or perform
by fl0wenol 6y ago
It's a design pattern that has it's uses. I've written plenty of code which goes through many precondition checks and has to throw appropriate errors or perform in-line fixups in the happy path, and this is the canonical way such things should be structured.
But as soon as the branching paths start splitting up and having different side effects or return different non-bailing conditions; then yeah, I'd quickly abandon that pattern.