[swift-evolution] [Pitch] Reimagining guard case/if case

Adrian Kashivskyy adrian.kashivskyy at me.com
Wed Oct 26 03:32:06 CDT 2016


I’m -1 as it’s currently written, for the following reasons:

1. Differences are introduced to pattern matching in different parts of the language (`switch` vs `if`/`guard` vs `for`).

2. Exclusion of `for` in the proposal is either deliberate (which relates to point 1.) or done as a result of a rush, which is not good either. This proposal should include a resolution for `for case let where` clauses.

3. Syntatic sugar of optional matching `let x? ~= maybeX` feels completely out of place and looks nothing like standard optional bindings. I will remain strongly against this change.

– Adrian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161026/156fd05c/attachment.html>


More information about the swift-evolution mailing list