[swift-evolution] [Review] SE-0057: Importing Objective-C Lightweight Generics
xenadu at gmail.com
Fri Apr 1 18:22:01 CDT 2016
> * What is your evaluation of the proposal?
Generally I like the proposal and I think it helps solidify the bridging story.
On casting: In our coding standards, any use of “as!” warrants much higher scrutiny (any use of try! or IUOs gets the same treatment). For a type that opts-in to type discovery, why can’t “as?” casting work? It seems like there’s enough information to determine if the cast should succeed or not.
It is also slightly strange that the collection types have the same problems but allow bridging, and in the as! case they actually defer checking until later. It may just be an inconsistency we have to live with for practical reasons.
> * Is the problem being addressed significant enough to warrant a change to Swift?
Yes; the mountains of Objective-C code aren’t going away anytime soon.
> * Does this proposal fit well with the feel and direction of Swift?
It has some rough edges but I think they’re unavoidable given the fundamental differences between Objective-C and Swift generics.
More information about the swift-evolution