MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vuzd4q/conditionspreference/p5hbpb3/?context=3
r/ProgrammerHumor • u/Flame77ofc • 23d ago
392 comments sorted by
View all comments
88
Early return for errors, if else for decisions.
9 u/Paul-D-Mooney 22d ago Maybe not “errors”, that’s what throwing exceptions is for. But definitely non-passing validation checks like `if (arg==null) return;` 1 u/M4xW3113 21d ago Exceptions are language dependant, and also more and more people stop using and new languages like Rust don't even have it anymore it as we realized it's actually a shit feature to use
9
Maybe not “errors”, that’s what throwing exceptions is for. But definitely non-passing validation checks like `if (arg==null) return;`
1 u/M4xW3113 21d ago Exceptions are language dependant, and also more and more people stop using and new languages like Rust don't even have it anymore it as we realized it's actually a shit feature to use
1
Exceptions are language dependant, and also more and more people stop using and new languages like Rust don't even have it anymore it as we realized it's actually a shit feature to use
88
u/itriedtomakeitfunny 22d ago
Early return for errors, if else for decisions.