> On Dec 6, 2016, at 3:48 PM, Robert Widmann via swift-evolution 
> <[email protected]> wrote:
> 
> Perhaps you're thinking about this choice of syntax from a different angle 
> than was intended.  `default` is not literally meant to be a "default value" 
> or, in most cases, "the default case", rather a "default pattern"; a place 
> for control to flow given no other option.  Some other languages, especially 
> those that emphasize patterns, syntaxize words like "otherwise" or simply use 
> "_", but I've not seen languages that mix C-style switch-case keywords with 
> C-style branching keywords before.

"Case Else" is common in Pascal-lineage syntaxes. (Shameless plug) We also used 
'else' for the default block signifier in Clay, since we adopted block syntax 
for cases instead of label-style cases as in C, e.g. 'switch (x) case (1) { ... 
} else { ... }'.

-Joe


_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to