[swift-evolution] Smart KeyPaths
rparada at mac.com
Wed Mar 22 15:51:05 CDT 2017
Yes, I was about to ask the same.
It seems like all the sigil characters are taken. This is one of the reasons why I did not object to the non-sigil notation originally proposed despite the ambiguity with static properties and instance properties with the same name. But using a sigil seems like it can unify method references and key path references.
Is the single quote taken? For example:
let path = 'Bag.things.name
And the examples on the proposal would become:
If we were to put it between root and the path then it would look like this:
let path = Bag'things.name
Right now the compiler tells me that it found an "unterminated string literal".
When I add the closing single quote then it tells me "single-quoted string literal found, use '"' instead"
> On Mar 22, 2017, at 3:16 PM, Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org> wrote:
>> On Mar 22, 2017, at 9:00 AM, Vladimir.S via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
> What do these do?
> // etc.
> Brent Royal-Gordon
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution