[swift-evolution] [Review #2] SE-0161: Smart KeyPaths: Better Key-Value Coding for Swift
david at hartbit.com
Thu Apr 6 00:54:10 CDT 2017
I'm writing my review inline to this one:
> On 6 Apr 2017, at 02:27, Tony Allevato via swift-evolution <swift-evolution at swift.org> wrote:
>> On Wed, Apr 5, 2017 at 4:56 PM Douglas Gregor via swift-evolution <swift-evolution at swift.org> wrote:
>> Hello Swift community,
>> The second review of SE-0161 "Smart KeyPaths: Better Key-Value Coding for Swift" begins now and runs through April 9, 2017. The revised proposal is available here:
>> The core team’s feedback from the first review of this proposal can be viewed at:
>> Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at
>> or, if you would like to keep your feedback private, directly to the review manager. When replying, please try to keep the proposal link at the top of the message:
>> Proposal link:
>> Reply text
>> Other replies
>> What goes into a review?
>> The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. When writing your review, here are some questions you might want to answer in your review:
>> What is your evaluation of the proposal?
> Full on +1 now. Thank you for reverting the heavy syntax from the previous revision. This makes the feature much more usable, and the future alignment with unbound function references will be welcome in terms of consistency.
I'm also +1 on this new revision.
> I guess I'll throw out my own color for the shed: Was :: already considered as well? It at least has some precedent in C++ and later Java for similar purposes, and it's not currently an operator in the language. We could have:
I proposed it during discussion. He only counter that I heard was that it was potentially reserved for name-spacing.
> Person.foo // a reference to Person's static property foo
> Person::foo // a keypath to Person's instance property foo
> Then, for SE-0042:
> Person::someFunction // a function reference of type (Person, ...other args...) -> Result
> But that might make the implied case look strange. Would we have to have this?
> print(luke[keyPath: ::.friends.name])
> Without the period after the "::", it's inconsistent with other type inference sites, but with it, it's kind of ugly.
> That being said, if the backslash ends up being the operator of record for this feature because other options would be poor choices for other reasons, I'm ok with that.
Same, I have a small preference for :: but I'd be ok with backslash.
> My feedback on the rest of the proposal review bullets is the same as before; I won't repeat it here.
>> Is the problem being addressed significant enough to warrant a change to Swift?
>> Does this proposal fit well with the feel and direction of Swift?
>> If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
>> How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
In depth study.
>> More information about the Swift evolution process is available at
>> Thank you,
>> Review Manager
>> swift-evolution mailing list
>> swift-evolution at swift.org
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution