Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of return statements in scala #6356

Closed
fm3 opened this issue Jul 28, 2022 · 0 comments · Fixed by #8205
Closed

Get rid of return statements in scala #6356

fm3 opened this issue Jul 28, 2022 · 0 comments · Fixed by #8205

Comments

@fm3
Copy link
Member

fm3 commented Jul 28, 2022

Got my first instances of NonLocalReturn and thus learned that return in scala is generally considered harmful. https://tpolecat.github.io/2014/05/09/return.html – I’d say it is worth taking the time to remove all return statements from the scala backend. Most are just if-guards that can easily be changed to if/else

Edit 2024: three instances of return remain, those are a little harder to rewrite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants