3 ms·
Why no explicit returns? I'm used to them from R, but I thought that was considered a quirk, not a feature.
by nerdponx 10y ago
Why no explicit returns? I'm used to them from R, but I thought that was considered a quirk, not a feature.
- tadeuzagallo 10y agoIt makes it easier to reason about a functions result, both when reading the code and when type checking.
- okonomiyaki3000 10y agoYeah, it strikes me as a bad idea. I mean, auto-returning the last statement is one thing but not allowing explicit returns means you can't use guard clauses.