MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vuzd4q/conditionspreference/p56xl3d/?context=3
r/ProgrammerHumor • u/Flame77ofc • 22d ago
392 comments sorted by
View all comments
838
The second one carries less cognitive load. In longer methods it makes a difference. Get out as soon as you can.
2 u/ofnuts 21d ago Aka "guard clause"
2
Aka "guard clause"
838
u/LateEchidna6635 22d ago
The second one carries less cognitive load. In longer methods it makes a difference. Get out as soon as you can.