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

Naked returns. Basically, you just write "return" and that returns the values declared as named return parameters.

If they are never mentioned in the body you probably have a return of the default nil value for the named return variables.

But then at least one return is not naked and returns some value, discarding the named one.

I think it's a bad use of named returns.



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

Search: