willowtreeapps / swift-style-guide

The official Swift style guide for WillowTree, Inc.
MIT License
16 stars 3 forks source link

What is our guideline for loop labels? #37

Closed kconner closed 7 years ago

kconner commented 7 years ago

As in,

outer: for section in table {
    for item in section {
        if so-and-so {
            // Do some work, then
            break outer
        }
    }
}

Do we have a guideline for naming and casing outer here?

ianterrell commented 7 years ago

semantically meaningful if possible, as with all names. I don't think this needs any guidelines.

kconner commented 7 years ago

Is there a standard casing for these? Camel?

ianterrell commented 7 years ago

Swift language guide uses camel: https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/ControlFlow.html

(search for gameLoop)

kconner commented 7 years ago

I guess this is all obvious enough. No guideline is fine.