3 ms·
I would also like continue to work that way, so that every (labelled) block can be freely looped and exited (with a value)
by afiori 5y ago
I would also like continue to work that way, so that every (labelled) block can be freely looped and exited (with a value)
- chrismorgan 5y agoI don’t think I’d want continue to work on a block. Repeating the block seems different from leaving the block early (which can already be done with return or with panicking). I think it’s better to need to write it as a loop before you can continue.
- afiori 5y agoI completely agree, In rust looping has important semantics with regards to lifetimes and ownership so the continue part would be a bad idea. I think it would be cool in something like javascript (if blocks could return values...)