[swift-evolution] Smart KeyPaths

Ricardo Parada rparada at mac.com
Tue Mar 21 22:01:21 CDT 2017


Sometimes I feel like we need a winning sigil for this, one that would look good, it is not already taken and easy to type in all keyboards. 

Maybe we'll have to start looking at emojis :-)



> On Mar 21, 2017, at 9:13 PM, Matthew Johnson via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 
> 
> Sent from my iPad
> 
>> On Mar 21, 2017, at 8:00 PM, Ben Rimmington <me at benrimmington.com> wrote:
>> 
>> Re: <https://github.com/apple/swift-evolution/pull/644>
>> 
>>> On 21 Mar 2017, at 13:16, Matthew Johnson wrote:
>>> 
>>> I think the language is best served if all unbound members are accessible using the same syntax.  IMO this proposal does the right thing by choosing consistency with existing language features.  The current syntax for unbound methods works and hasn't caused any confusions I'm aware of in practice.  
>>> 
>>> I don't feel too strongly about what syntax we use as long as it's concise and works for accessing all unbound members.  If people want to make the case for using `#` instead of `.` to do this I won't object but I won't be a vocal advocate either.  However, I think that should be an independent proposal if somebody wants to pursue it rather than a bike shed on this proposal which would only lead to inconsistency between key paths and unbound methods if it succeeds.
>> 
>> A new syntax for key paths and function references could resolve:
>> 
>> * the "compound name syntax for nullary functions" problem;
>> <https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170220/032890.html>
>> 
>> * the source-breaking change of SE-0042 (if reconsidered for Swift 4);
>> <https://github.com/apple/swift-evolution/blob/master/proposals/0042-flatten-method-types.md>
> 
> I would like to see both of these problems resolved.  If somebody put together a solid proposal for this I would probably support it (depending on details of course).  
> 
>> 
>> -- Ben
>> 
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution


More information about the swift-evolution mailing list