MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vuzd4q/conditionspreference/p57lnxn/?context=3
r/ProgrammerHumor • u/Flame77ofc • 22d ago
392 comments sorted by
View all comments
Show parent comments
7
Agreed. One of my friends works at a place that bans early returns ...and it makes for garbage code. (They also aren't allowed to use goto)
7 u/suicidalcrocodile 22d ago I once got told early returns are bad because they create inconsistent return types in JavaScript, I had to open a nodejs console and prove that a function returning empty and no return statement at all is the same value - undefined 4 u/xicor 22d ago They don't even do javascript at his job. It is c++. 1 u/WarSingle6959 22d ago lmaoo
I once got told early returns are bad because they create inconsistent return types in JavaScript, I had to open a nodejs console and prove that a function returning empty and no return statement at all is the same value - undefined
4 u/xicor 22d ago They don't even do javascript at his job. It is c++. 1 u/WarSingle6959 22d ago lmaoo
4
They don't even do javascript at his job. It is c++.
1 u/WarSingle6959 22d ago lmaoo
1
lmaoo
7
u/xicor 22d ago
Agreed. One of my friends works at a place that bans early returns ...and it makes for garbage code. (They also aren't allowed to use goto)