[swift-evolution] ternary operator ?: suggestion
dabrahams at apple.com
Sat Dec 19 21:57:47 CST 2015
> On Dec 19, 2015, at 7:55 PM, Jordan Rose via swift-evolution <swift-evolution at swift.org> wrote:
> It's a nice, consistent proposal, but I don't feel like this solves any of the complaints about the existing ternary operator:
> - It's not obvious what it does when you first learn it.
> - The '?' doesn't have anything to do with Optionals.
> It is a way to put 'switch' into an expression. I'm not a fan of the two different colons, but that's "just" syntax.
+1 to all that
>> On Dec 18, 2015, at 14:04 , Paul Ossenbruggen via swift-evolution <swift-evolution at swift.org> wrote:
>> I think, I finally might have the answer to improving ternary, with such a bold statement come some pretty high expectations but I think, I might actually have done it this time :-)
>> I am calling it the Demux Expression, it builds on the benefits of ternary and switch while improving on those.
>> This is a first draft, thanks in advance for feedback!
>> - Paul
>> swift-evolution mailing list
>> swift-evolution at swift.org
> swift-evolution mailing list
> swift-evolution at swift.org
More information about the swift-evolution