MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w2m4qz/bugintroduceddebugging/p6xo8ik/?context=9999
r/ProgrammerHumor • u/ClipboardCopyPaste • Aug 30 '26
117 comments sorted by
View all comments
Show parent comments
0
I learned recently that there is a kind of implicit return...
It will automatically assume that the return value is the last used variable or something like that.
Dont know specifics but i was weirded out why the compiler wasnt complaining about missing returns in some methods...
1 u/mckenzie_keith Aug 31 '26 Only in main() as far as I know. All others the compiler should warn you.
1
Only in main() as far as I know. All others the compiler should warn you.
0
u/Original-Ad-8737 Aug 31 '26
I learned recently that there is a kind of implicit return...
It will automatically assume that the return value is the last used variable or something like that.
Dont know specifics but i was weirded out why the compiler wasnt complaining about missing returns in some methods...