[swift-evolution] [Idea] Find alternatives to `switch self`

Charles Constant charles at charlesism.com
Sun May 22 01:41:22 CDT 2016


Thought I'd just followup about the code I posted. It's basically
*horrible* for anything other than toying around. I just clued in that it
doesn't short when it finds a value. Also it causes Playground to stall for
a couple minutes on my machine. Shame :(

PS: It would also have been nice to replace "…" with the built-in "??" but
the precedence doesn't leave any space between 130, and 131 (which is a
pretty good argument to support recently discussed proposal about making
precedence relative)

Do we already have a proposal to add ternary-style *custom* operators (ie:
in addition to infix/prefix/postfix)? I would settle for that, if none of
the "switch assignment" or "multiary ternary" proposals make it into Swift
4.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160521/dda7540d/attachment.html>


More information about the swift-evolution mailing list