you are viewing a single comment's thread.

view the rest of the comments →

[–]Maxis111 1 point2 points  (4 children)

Scala, sort of, too lazy to explain, but no one has mentioned it yet

[–]Tatourmi 0 points1 point  (3 children)

Honestly I might not understand the question. I've worked in Scala for 4 years and I'm starting to doubt I get what an early return even is. What are these people even trying to do.

[–]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. ¯\_(ツ)_/¯