[swift-evolution] [swift-evolution-announce] [Review] SE-0116: Import Objective-C id as Swift Any type
Scott James Remnant
scott at netsplit.com
Wed Jul 6 14:21:02 CDT 2016
“AnyObject” has always seemed to me to be quite weird in Swift, since it considers classes to be special when compared to value types. Any move to lessen its use gets my vote.
A comment on Impact on existing code in the proposal: due to the nature of the bridging, it is still going to be very common in Swift to see this kind of construct:
let mapOfThings: [String: AnyObject] = [ … ]
Since AnyObject conforms to Any, I don’t think this proposal will break that code, but should it suggest a fixit anyway since the author of the code is conforming to the interface, and not expressing an intent about AnyObjects here.
More information about the swift-evolution