Re: [swift-users] if-case syntax ambiguity

2016-11-09 Thread Nicholas Outram via swift-users
Thanks for that, it was really helpful. I see it now. I’m happy to admit I had not fully appreciated the notion of pattern matching, and I very much doubt I'm alone either. The Swift Programming book goes some way to explain it (in the language reference section) - maybe this is an area that ne

Re: [swift-users] if-case syntax ambiguity

2016-11-09 Thread Michael Nisi via swift-users
Yes, equals isn't assignment but pattern matching here. Reminds of Erlang, which I love. Michael > On 9 Nov 2016, at 12:57, Zhao Xin via swift-users > wrote: > > The `if case` is the same meaning as `switch-case`, so I don't think there is > anything ambitious. For `switch-case`, it is not e

Re: [swift-users] if-case syntax ambiguity

2016-11-09 Thread Zhao Xin via swift-users
The `if case` is the same meaning as `switch-case`, so I don't think there is anything ambitious. For `switch-case`, it is not equal, it is matching. Zhaoxin On Wed, Nov 9, 2016 at 7:17 PM, Nicholas Outram via swift-users < swift-users@swift.org> wrote: > Hi > > I’ve been drilling down on the sy