Hacker News new | past | comments | ask | show | jobs | submit login

This is the only way it can be done in statically typed language. You cannot have multiple returns without defining how many there are what are their types.



The definition of what they are and how many could just as easily be done at the function declaration. There is no requirement that multiple return types in a static language have to be declared separately and verbosely. That is just how C does it.




Applications are open for YC Winter 2020

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

Search: