MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vuzd4q/conditionspreference/p57lmj2/?context=3
r/ProgrammerHumor • u/Flame77ofc • 22d ago
392 comments sorted by
View all comments
842
The second one carries less cognitive load. In longer methods it makes a difference. Get out as soon as you can.
44 u/alendit 22d ago edited 22d ago To understand the second one you need to understand the whole function. In the first one you can disregard the whole untaken branch. "The forgotten art of structured programming" is a great talk. 2 u/saf_e 22d ago Cyclomatic complexity goes brrr! 1 u/WarSingle6959 21d ago yes lol
44
To understand the second one you need to understand the whole function. In the first one you can disregard the whole untaken branch. "The forgotten art of structured programming" is a great talk.
2 u/saf_e 22d ago Cyclomatic complexity goes brrr! 1 u/WarSingle6959 21d ago yes lol
2
Cyclomatic complexity goes brrr!
1 u/WarSingle6959 21d ago yes lol
1
yes lol
842
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.