[swift-evolution] Proposal: Pattern Matching Partial Function (#111)

Maximilian H├╝nenberger m.huenenberger at me.com
Thu Feb 4 08:14:58 CST 2016

Should we allow mixing "case" and "cases"?

I don't think so since a "cases" between several "case"'s is not recognizable enough.

With the current grammar "cases" is also allowed after "case" labels:

Example (this is currently allowed):

match(3) {
    case 1: "one"
    case 2: "two"
    cases 3: "three", 4: "four"
    default: "undefined"

More information about the swift-evolution mailing list