[swift-evolution] [Review] SE-0072: Fully eliminate implicit bridging conversions from Swift

Jordan Rose jordan_rose at apple.com
Thu May 5 22:18:30 CDT 2016

> On May 5, 2016, at 16:32, Joe Pamer <jpamer at apple.com> wrote:
>> On May 2, 2016, at 9:09 AM, Jordan Rose <jordan_rose at apple.com <mailto:jordan_rose at apple.com>> 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!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160505/6e19a8e7/attachment.html>

More information about the swift-evolution mailing list