[swift-evolution] ternary operator ?: suggestion
tseitz42 at icloud.com
Wed Jan 20 11:28:58 CST 2016
> Am 20.01.2016 um 18:13 schrieb Chris Lattner <clattner at apple.com>:
>> On Jan 20, 2016, at 8:22 AM, Thorsten Seitz <tseitz42 at icloud.com> wrote:
>>>> I’m not sure I understand. What specific case do you mean and what composability is lost with the unary function approach?
>>> I’m saying that tying closure expressions and switch expressions together makes it inconvenient when you want a local switch in a non-function context.
>> I'm sorry, but I'm afraid I still don't understand. Using the global match() function you can easily provide the function context and place the switch locally everywhere an expression is possible.
> Ah, that is what I missed. I thought that you were proposing match to be a keyword, not a standard library function. Ok, I see how it fits together now.
Ah, glad to see it was just a misunderstanding :-)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution