Re: [swift-evolution] About "default" keyword in switch statement

2016-12-06 Thread 星野恵瑠 via swift-evolution
Hi everyone Thanks for all of your replies, and also thanks a lot for your time discussing this topic with me. Also especially thanks to Robert to explain the meaning of "default" in switch statement. Now I can agree keeping using "default" keyword in switch statement. Sorry to bother you all wi

Re: [swift-evolution] About "default" keyword in switch statement

2016-12-06 Thread Joe Groff via swift-evolution
> On Dec 6, 2016, at 3:48 PM, Robert Widmann via swift-evolution > 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 pa

Re: [swift-evolution] About "default" keyword in switch statement

2016-12-06 Thread Robert Widmann via swift-evolution
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, esp

Re: [swift-evolution] About "default" keyword in switch statement

2016-12-06 Thread David Sweeris via swift-evolution
> On Dec 6, 2016, at 9:51 AM, Jeremy Pereira via swift-evolution > wrote: > > Plus, I little while ago, I came across a situation where the code would have > read marginally better if I had been able to put the default case at the top > of the switch (illegal in Swift 3) with the other cases

Re: [swift-evolution] About "default" keyword in switch statement

2016-12-06 Thread Jeremy Pereira via swift-evolution
> On 6 Dec 2016, at 04:11, 星野恵瑠 via swift-evolution > wrote: > > p.s. > > I've read this mail and totally understand that Swift is designed to be > familiar with C family languages, which "default" is widely used. > https://github.com/apple/swift-evolution/blob/master/commonly_proposed.md Di

Re: [swift-evolution] About "default" keyword in switch statement

2016-12-06 Thread 星野恵瑠 via swift-evolution
p.s. I've read this mail and totally understand that Swift is designed to be familiar with C family languages, which "default" is widely used. https://github.com/apple/swift-evolution/blob/master/commonly_proposed.md But since Swift 3.0 has already make many source breaking changes and supports

[swift-evolution] About "default" keyword in switch statement

2016-12-06 Thread 星野恵瑠 via swift-evolution
Many languages have a switch statement and most (maybe all?) of them use "default" keyword for the condition which doesn't match any of those listed in the switch statement. But sometimes that condition is just an exception, which literally IS NOT a default condition. So how about using other