Ah! I will fix those. That is a find replace fail for #keyPath( -> \. Vs 
#keyPath\(.*\) -> \\\1

> On Apr 6, 2017, at 6:16 AM, Ricardo Parada via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> I saw those too and forgot to point those out. I assumed they were typos. 
> 
> 
> 
>> On Apr 6, 2017, at 9:03 AM, Ed Wellbrook <edwellbr...@gmail.com> wrote:
>> 
>> Apologies if I’ve simply just missed something, but are the trailing right 
>> parentheses in the proposed solution intentional? Reading through the code, 
>> having loosely followed this discussion, I’m really confused.
>> 
>> Examples:
>> 
>> ```
>> // create a key path and use it
>> let firstFriendsNameKeyPath = \Person.friends[0].name)
>>                                                    ^ this
>> 
>> // optional properties work too
>> let bestFriendsNameKeyPath = \Person.bestFriend?.name)
>>                                                    ^ this
>> ```
>> 
>> If it’s intentional, I’m very much against it.
>> 
>> Cheers,
>> Ed
>> 
>>> On 6 Apr 2017, at 13:14, Ricardo Parada via swift-evolution 
>>> <swift-evolution@swift.org> wrote:
>>> 
>>> 
>>>> On Apr 5, 2017, at 11:13 PM, Xiaodi Wu <xiaodi...@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]
>>> 
>>> _______________________________________________
>>> swift-evolution mailing list
>>> swift-evolution@swift.org
>>> https://lists.swift.org/mailman/listinfo/swift-evolution
>> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution@swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to