Get rid of those two control-flow keywords. Reasoning:
The alternative of using an additional method feels only a slightly bit clunkier to write and vastly easier to read and understand when coming back after a month.
The implementation complexity and the mental complexity for users has never been worth the "convenience".
There aren't much reasons for break and continue to exist in general – it feels like this is something that got copied from C and keeps getting copied without anyone questioning it much. If break and continue didn't exist today, we wouldn't invent it.
Get rid of those two control-flow keywords. Reasoning:
break
andcontinue
to exist in general – it feels like this is something that got copied from C and keeps getting copied without anyone questioning it much. Ifbreak
andcontinue
didn't exist today, we wouldn't invent it.