Re:Push ifs up and fors down
by Izkata on Wednesday November 15, 2023 @11:20PM
(#38285765)
The key to the idea above is that you don't have any "else" clause. It's an early return, raise an exception, or modify the data so it's no longer bad.
[ Parent
| on HN ]
Re:Push ifs up and fors down
by blandflakes on Wednesday November 15, 2023 @11:28PM
(#38285796)
Yes, that's why I said I realized they weren't quite the same situation, while adding another example of a situation where people create hard to follow structures.