> On 5 Oct 2016, at 15:29, Haravikk via swift-evolution 
> <[email protected]> wrote:
> 
> 
> I agree with Tim; I'm a +1 for switch! for a convenient means of erroring 
> out, but I think switch? is a bit too different from normal usage of the 
> question-mark.
> 
> One other alternative might be if there could be some kind of switch else 
> syntax, kind of like a guard statement, allowing options on what to do? Only 
> problem is how best to structure it, as the use of break might confusing as 
> to its scope, like so:
> 
>       switch(foo) else break { // Break from the switch, or the enclosing 
> block?

We already have that in default, The syntax is different, but at least the 
meaning of break is unambiguous. 

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to