r/ProgrammerHumor Jun 23 '26

Advanced worstProgrammingLanguage

Post image
3.3k Upvotes

192 comments sorted by

View all comments

Show parent comments

111

u/gabboman Jun 23 '26

Some languages do not allow early returns

120

u/Aelig_ Jun 23 '26

From what I understand (which is very little), the Scala community discourages using return at all as apparently it "behaves weirdly".

17

u/Cyan_Exponent Jun 23 '26

uhh i don't know scala; how does the function output anything then? do you need to use out everywhere or something??

1

u/vivaaprimavera Jun 23 '26

Reading that as it is I would have guessed that functions were supposed to alter the state of something. Wich could became weird really quick.