[swift-evolution] Smart KeyPaths

Charles Srstka cocoadev at charlessoft.com
Sun Mar 19 14:57:22 CDT 2017

> On Mar 19, 2017, at 2:51 PM, Jean-Daniel via swift-evolution <swift-evolution at swift.org> wrote:
>> Le 19 mars 2017 à 16:41, Ricardo Parada via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> a écrit :
>> I agree that they can get mixed up with static properties. However, I think I would not mind because it would only cause an ambiguity when having a static property with the same name as the property which would be an odd practice I think.  
> I disagree. How the reader is supposed to now there is a static property or not ? Having readable code is more important than having easy to write code.

I’ve got to agree with this. With the proposed syntax, it’s unclear whether you’re referring to a static property or a key path. It’s going to cause confusion. There needs to be some kind of syntactic way to differentiate the two.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170319/34a35720/attachment.html>

More information about the swift-evolution mailing list