Notes |
|
|
Additional idea: Add label to loop header.
TTF discussion: To be discussed in the scope of the next TTF. Proposal cannot be implemented as proposed for select case statement. It would lead to a backwards incompatible change. |
|
|
|
TTF discussion: Break and Continue shall be analysed in the scope of the major release. Additional ideas include the deprecation of Goto as well as introduction of breaks/continue across several scope units. |
|
|
|
After diiscussions within TTF:
Possible solution can be "named cycles"
while (...) {
while (...){
break w1; //or continue w1;
}
} : w1
break w1; will terminate both cycles, execution continues with the next instruction after w1.
continue w1; will terminate the innermost cycle and takes the next iteration of the "w1" cycle.
Similar construct can be applied for nested alt instructions with break/repeat "named alt").
alt {
[] ...{
alt {
[] ... {break a1;}
...
}
...
[] ....
}
}: a1;
"altlabels" and "cyclelabels" can be mixed, until they do not "jump" out of the scope.
alt {
[] ... { while (...) { break a2;}}
...
}: a2
If this construct is implemented it may cause to deprecate the goto/label. |
|
|
|
The resolution of the ticket shall be postponed to the next major revision. |
|
|
|
It seems to be another flavour of "goto", so we do not see the benefit. On the other hand, it is increasing the complexity of the language allowing further flavours of code writing. Also, we are not aware that code cannot be written using existing means. |
|