<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi All,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I would like to ask you to consider banning the break statement at the non-fall through switch.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">First, this statement does nothing here. The return value is presented using a different keyword (yield), so there's really no purpose left for the break statement.</div><div class="gmail_default"><br></div><div class="gmail_default" style="font-size:small">Additionally, it is confusing, as there's no control flow here that could be interrupted.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If we want an empty case body, currently it is possible to provide an empty block. (I would recommend allowing the completely empty case bodies, similarly to the legacy switch.)</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">In a switch expression it isn't possible to use it, because we have to yield a value, and can't break the flow before that. So this is already an asymmetry, we won't make it worse allowing the break only at a fall through switch statement, at the only case it makes sense.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">It could be possible to use the break statement within the switch, but that would be related only to the outer control flow, like a for loop. In this way it would be possible to break the outer flow without using a label.</div><div class="gmail_default" style="font-size:small"><br>Thank you,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Regards,</div><div class="gmail_default" style="font-size:small">Hunor</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div></div>