[swift-evolution] Proposal: "break for", "break do", "break if", "break case", "break repeat", etc.

Ilias Karim ilias.karim at gmail.com
Wed Dec 9 17:26:37 CST 2015


alternatively, you could already avoid using labels by breaking your code into functions or methods (or closures)

Ilias

> On Dec 9, 2015, at 1:26 PM, Amir Michail via swift-evolution <swift-evolution at swift.org> wrote:
> 
> With such constructs, you could avoid using labels most of the time.
> 
> For example:
> 
> for … {
>  if … {
>    guard … else { break if }
>    ...
>  }
> }
> 
> for … {
>  for … {
>    if … {
>      break outer for
>    }
>  }
> }
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution



More information about the swift-evolution mailing list