maybe give it a different keyword, instead of brea...
# language-proposals
j
maybe give it a different keyword, instead of break, call it
value
which sets a value for return, but doesn't break; If
value
is not present, treat it like a regular loop with Unit return So just like with if-else where the compiler can check that you do a value return, the compiler can make sure that you do a
value "somevalue"
in the loop, otherwise complain that the variable might not have been initialized.