> On Jan 20, 2017, at 12:22 PM, Dave Abrahams via swift-evolution
> <[email protected]> wrote:
>
>>
>> Yeah, maybe there's a more general language feature that could replace
>> 'fallthrough' here. Instead
>> of labelling cases, we could support a 'reswitch' statement that
>> redispatches the switch to the case
>> matching the operand:
>>
>> switch some_value {
>> case .REFINED:
>> if !validate(some_value) { return NULL }
>> reswitch .BASE
>>
>> case .BASE:
>> handle_enum_value();
>> }
>
> We should just call a spade a spade and spell that "goto" ;-)
Goto has traditionally been used for unstructured control flow, but this form
is still fully structured. You cannot produce irreducible loops, jump into
scopes, over declarations, etc.
-Chris
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution