By the way, I am okay with the syntax in the proposal too. I'm just brainstorming so that we can look at all the options. I am guessing the authors (David Smith, Michael LeHew and Joe Groff) probably went through this process already and settled with the simpler notation. :-)
> On Mar 22, 2017, at 4:51 PM, Ricardo Parada via swift-evolution > <[email protected]> wrote: > > 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[0].name > bag[path] > bag['Bag.things[0].name] > bag['.things[0].name] > bag.things[0]['.name] > bag.things[0]['Thing.name] > > And the examples on the proposal would become: > > 'Person.friends[0].name > luke['.friends[0].name] > luke.friends[0]['.name] > > If we were to put it between root and the path then it would look like this: > > let path = Bag'things[0].name > bag[path] > bag[Bag'things[0].name] > bag['things[0].name] > bag.things[0]['name] > bag.things[0][Thing'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 >> <[email protected] <mailto:[email protected]>> wrote: >> >>> On Mar 22, 2017, at 9:00 AM, Vladimir.S via swift-evolution >>> <[email protected] <mailto:[email protected]>> wrote: >>> >>> bag[#path] >> >> What do these do? >> >> bag[#file] >> bag[#line] >> bag[#function] >> // etc. >> >> -- >> Brent Royal-Gordon >> Architechies >> >> _______________________________________________ >> swift-evolution mailing list >> [email protected] <mailto:[email protected]> >> https://lists.swift.org/mailman/listinfo/swift-evolution > > _______________________________________________ > swift-evolution mailing list > [email protected] > https://lists.swift.org/mailman/listinfo/swift-evolution
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
