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

Martin Waitz tali at admingilde.org
Mon Oct 24 15:38:35 CDT 2016


Hi,

When using a pattern match operator, I’d prefer to reverse its arguments:

    if value matches pattern …

    if result =~ .success(let x) { use(x) }

Being used to pattern matching in functional languages, I also do like our current syntax.
Using ~= together with `let` on the left looks very strange to me.

— Martin


More information about the swift-evolution mailing list