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'
                    ^~~
                    "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 
> <[email protected]> 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 
>> <[email protected] <mailto:[email protected]>> 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?
> Yes.
> 
>> Does this proposal fit well with the feel and direction of Swift?
> Yes
> 
>> 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?
> In-depth.
> 
> _______________________________________________
> swift-evolution mailing list
> [email protected] <mailto:[email protected]>
> https://lists.swift.org/mailman/listinfo/swift-evolution 
> <https://lists.swift.org/mailman/listinfo/swift-evolution>
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to