[swift-evolution] [Review #2] SE-0161: Smart KeyPaths: Better Key-Value Coding for Swift
Ricardo Parada
rparada at mac.com
Thu Apr 6 07:14:02 CDT 2017
> On Apr 5, 2017, at 11:13 PM, Xiaodi Wu <xiaodi.wu at gmail.com> wrote:
>
> It is also worth mentioning that, with the sigil, the `keyPath` label may not be so necessary:
>
> print(luke[\.friends[0].name])
> // or, if the suggestion above is accepted
> print(luke[\.friends[0].name\])
I think the label makes it more obvious, specially when using it with a key path variable:
let someKeyPath = ...
person[keyPath: someKeyPath]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170406/34b40368/attachment.html>
More information about the swift-evolution
mailing list