Using return is usually, but not always, a code smell in Scala - something that indicates that you're doing something that could be written more clearly in a more expression oriented way or with some nested functions or whatever. As always there are exceptions where return make sense. For instance, if you use a while loop in a certain bit of performance critical code then you may need to jump out early and return might be clearer than adding extra condition checks. On the other hand, if that kind of code is common for you then it might be that you're trying to pound a Scala shaped peg into a Java or even C shaped hole.
On Tue, Mar 3, 2009 at 6:43 PM, Andrés Testi <andres.a.testi@gmail.com> wrote: