> On May 5, 2016, at 16:32, Joe Pamer <[email protected]> wrote:
> 
> 
>> On May 2, 2016, at 9:09 AM, Jordan Rose <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> It’s not the keys that are the problem; it’s the values. String and Array 
>> are not AnyObjects. Today they get an implicit conversion because they are 
>> known-bridgeable.
> 
> Hey Jordan,
> 
> I share your concern, though I’ve spent my day combing through whatever large 
> codebases I could get my hands on, and I’ve encountered very few “plist 
> literals” where removing implicit bridging conversions would be a problem.
> 
> Specifically, quickly analyzing 710 swift code bases (a sampling of GitHub 
> projects, plus others I have access to), I encountered 1785 Dictionary values 
> with an AnyObject key. Of those, only 15 appear to make use of implicit 
> bridging conversions when initializing or assigning to the value.
> 
> Since the impact appears to be relatively limited, I think the consistency 
> we’ll gain from this change will make it worthwhile.

Good to know. If it’s relatively rare (both in how much it comes up and how 
much that code is written) then the few extra explicit coercions won’t be an 
undue burden. Thanks for looking into this, Joe!

Jordan

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to