Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why no explicit returns? I'm used to them from R, but I thought that was considered a quirk, not a feature.


It makes it easier to reason about a functions result, both when reading the code and when type checking.


Yeah, 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: