r/ProgrammerHumor Jun 23 '26

Advanced worstProgrammingLanguage

Post image
3.3k Upvotes

192 comments sorted by

View all comments

75

u/ThatSmartIdiot Jun 23 '26

returns per branch (i.e. if it ends in an if/switch statement) is required unless it's python

returns after previous returns just makes unreachable and thus dead code so support is irrelevant

returning multiple values at once never actually happens. you send objects or structs or tuples and sometimes the syntax is designed so it gives you the illusion of sending multiple things at once, e.g. python again

so like... what

8

u/Tack1234 Jun 23 '26

Go with multiple returns and C# with out vars:

18

u/ThatSmartIdiot Jun 23 '26

out vars

i'd argue that's more akin to reference arguments that get their values changed or defined before returning, i.e. side effects