3 ms·
Ruby has a similar pattern. It's a pretty popular language. Correlation is not causation. Having return expressions does not make or break a language. Python
by Manishearth 10y ago
Ruby has a similar pattern. It's a pretty popular language.
Correlation is not causation. Having return expressions does not make or break a language.
Python and JS do have return expressions in the context of lambdas.
I'm not very fond of this pattern in untyped languages (Ruby, Perl) because it can lead to accidental returns, but I'm pretty happy with having it in a typed language.