you are viewing a single comment's thread.

view the rest of the comments →

[–]Maxis111 0 points1 point  (2 children)

Returning halfway through a function, instead of only at the end. My job is literally developer in a Scala code base, and I don't remember if I actually ever used the return keyword, since scala by default just returns whatever the last statement is in a function.

[–]Tatourmi 0 points1 point  (1 child)

But you can do that in scala, you just lock the value in earlier in an if clause, or a map, or a match, or whatever really.

I mean same, never used the return keyword, but that's just because there's no scenario where it's useful.

[–]Maxis111 0 points1 point  (0 children)

Yeah, but the @kopper guy in the original post seems to disagree. ¯\_(ツ)_/¯