Hi,
I found it odd that the `label:` style is used for switch-case conditions,
considering that Swift does not have implicit fallthrough. To me the label
style only makes sense if you think of conditions essentially as labels for
a goto statement, which implies fallthrough.
Personally I think this syntax would make more sense:
switch condition {
case 1 {
//
}
case 2 {
//
}
}
This is how Rust implements match, although it is an expression so it
especially applies to that context. Nonetheless I think the above syntax
not only looks a lot nicer but makes more sense, especially since the
current syntax is the only instance where Python-style colons and
indentation are used for designating sections of code rather than braces.
Thoughts?
-Marco
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution