Re:Functional languages will rule (but not this year)
by gaius on Saturday May 28, 2011 @12:37PM
(#2594704)
It's because it makes it harder to prove that a function does one of only two things: returns a known type, or throws and exception. In Python it's legal to have a function that can return 0 or return "hello" or nothing at all.
[ Parent
| on HN ]
Re:Functional languages will rule (but not this year)
by mb21 on Saturday May 28, 2011 @07:49PM
(#2595477)
I don't understand. I can't tell if you are arguing for or against explicit returns. Can you elaborate?
Re:Functional languages will rule (but not this year)
by silentbicycle on Sunday May 29, 2011 @12:50AM
(#2596045)
I suspect he read "typing return" as "return having one specific type" (i.e., "return an int (not string, float, etc.)".
That's a different (but related) issue.