> On Apr 8, 2017, at 9:12 PM, Tony Allevato via swift-evolution 
> <[email protected]> wrote:
> 
> `\(Foo.bar)` looks like it would try to evaluate `Foo.bar` first and then 
> compute the "keypath" of that, which doesn't make sense, whereas `(\Foo.bar)` 
> makes it clear that the keypath expression is being separated from whatever 
> might come after it.


Backing this up: It's also worth remembering that this syntax is an edge case. 
The vast majority of key paths will not be ambiguous in a way that requires 
parentheses. Even if you think \(Foo.bar) would look better than (\Foo.bar), 
you should keep in mind that most of the time, you'll only need \Foo.bar, and 
the parenthesized syntax should be a natural extension of that. 

-- 
Brent Royal-Gordon
Sent from my iPhone

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to