webknossos icon indicating copy to clipboard operation
webknossos copied to clipboard

Get rid of return statements in scala

Open fm3 opened this issue 3 years ago • 0 comments

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

fm3 avatar Jul 28 '22 12:07 fm3