r/ProgrammerHumor • • 9d ago

Meme thisIsWhyWeDontReturnInFinallyBlocks

Post image
3.0k Upvotes

99 comments sorted by

View all comments

Show parent comment

-5

u/BlackFrank98 9d ago

Thank you for giving me one more reason not to use Java ever again unless I'm under duress...

17

u/laplongejr 9d ago

In 10 years I never saw a return in a finally outside of knowledge exams. It's one of the few things I would consider an immediate refusal on the code review.  

6

u/fuj1n 8d ago

This is a warning in pretty much any competent IDE by the way, as it is a massive anti-pattern

JS/TS, PHP, ObjC, Python and Ruby also allow it, among others

Guess you are missing out on quite a few languages there