[swift-evolution] [Review #2] SE-0161: Smart KeyPaths: Better Key-Value Coding for Swift
rparada at mac.com
Thu Apr 6 10:59:37 CDT 2017
The escape character is already being used in String interpolation, i.e. \(foo). Also, escaping special characters in string literals, i.e. \t is tab, \n is a newline character, etc. The single quote does not appear to be in use. I believe it's not being used for string literals nor character literals:
ERROR at line 6, col 21: single-quoted string literal found, use '"'
let someCharacter = 'a'
Based on this, I don't think the use of single quote is a bad idea for Swift's smart key paths, IMHO.
But if the core team decides is reserved for something else, the escape character would be fine with me. But I do think the single quote would be slightly superior to the escape character.
> On Apr 6, 2017, at 11:35 AM, James Berry via swift-evolution <swift-evolution at swift.org> wrote:
> +1 to this revised proposal.
> I think the backslash is good. Even if it looks a little funny on first blush, I think it’s the best choice. I don’t like other’s suggestion of ‘keypath’, which I think is confusingly string-like: single quotes should be saved for possible string expansions.
>> On Apr 5, 2017, at 4:56 PM, Douglas Gregor via swift-evolution <swift-evolution at swift.org <mailto: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:
>> https://github.com/apple/swift-evolution/blob/master/proposals/0161-key-paths.md <https://github.com/apple/swift-evolution/blob/master/proposals/0161-key-paths.md>
>> What is your evaluation of the proposal?
> Strong +1. Let’s get this done.
>> 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?
> This is great.
>> How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
> swift-evolution mailing list
> swift-evolution at swift.org <mailto:swift-evolution at swift.org>
> https://lists.swift.org/mailman/listinfo/swift-evolution <https://lists.swift.org/mailman/listinfo/swift-evolution>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution