Skip to main content

All Questions

23 votes
2 answers
15k views

Why does Scala have return but not break and continue

Scala does not have break or continue, so some loop behavior takes a bit more of thinking. Ending a loop early requires tail recursion, exceptions, or scala.util.control.Breaks (which uses exceptions)...
Paul Draper's user avatar
  • 6,080