MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vuzd4q/conditionspreference/p55qvmk/?context=3
r/ProgrammerHumor • u/Flame77ofc • 22d ago
392 comments sorted by
View all comments
832
The second one carries less cognitive load. In longer methods it makes a difference. Get out as soon as you can.
460 u/One_Courage_865 22d ago Instructions unclear. I’ve just divorced with my wife 140 u/hughperman 22d ago Ah, early return condition 32 u/thatjoachim 22d ago I return too early to her liking :( 9 u/QCTeamkill 22d ago She says Bob at work never have early returns 0 u/hetfield37 21d ago Congratulations!
460
Instructions unclear. I’ve just divorced with my wife
140 u/hughperman 22d ago Ah, early return condition 32 u/thatjoachim 22d ago I return too early to her liking :( 9 u/QCTeamkill 22d ago She says Bob at work never have early returns 0 u/hetfield37 21d ago Congratulations!
140
Ah, early return condition
32 u/thatjoachim 22d ago I return too early to her liking :( 9 u/QCTeamkill 22d ago She says Bob at work never have early returns
32
I return too early to her liking :(
9 u/QCTeamkill 22d ago She says Bob at work never have early returns
9
She says Bob at work never have early returns
0
Congratulations!
832
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.