I normally don't wish harm upon anyone. But having to work with Ruby for some time now, i sincerely wish whoever made these decisions to stub their little toes on furniture twice every day.
I don't think it's intuitive to use the function name is the keyword for return at all. I've got other code I want to reuse and paste in to a new function I'm making with few changes, now I've got to change all the return instances to the new function name. What was so wrong with a command like RETURN?
Or if a function isn’t explicitly returning something, just do void, or null. But the language deciding for you that it must return something and if you don’t choose, it will? That’s just crazypants.
View all comments
Show parent comment
12
u/BastetFurry Sep 30 '26
At least QBasic has the somewhat sane idea that you simply set the function name to the variable you want to return.
i.e.:
Function Foo(bar,baz)Foo = bar*bazEnd FunctionBut that? That is evil.