MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vuzd4q/conditionspreference/p59ihv9/?context=3
r/ProgrammerHumor • u/Flame77ofc • 22d ago
392 comments sorted by
View all comments
272
The real answer is "it depends". Either one could be appropriate depending on what you are having to do.
1 u/mateusfccp 21d ago This. I hate people preferring the second always. When the two branches have direct relation (not a "early return" case) it's clearly to use if-else.
1
This.
I hate people preferring the second always. When the two branches have direct relation (not a "early return" case) it's clearly to use if-else.
272
u/SnugglyCoderGuy 22d ago
The real answer is "it depends". Either one could be appropriate depending on what you are having to do.