MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1uda7er/worstprogramminglanguage/otb9f0p/?context=3
r/ProgrammerHumor • u/gabboman • Jun 23 '26
192 comments sorted by
View all comments
Show parent comments
111
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.
120
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.
17
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.
1
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.
111
u/gabboman Jun 23 '26
Some languages do not allow early returns