[swift-evolution] [Pitch] SE-0083 revisited: removing bridging behavior from `as`/`is`/`as?` casts

Charles Srstka cocoadev at charlessoft.com
Thu Mar 2 20:16:33 CST 2017


> On Mar 1, 2017, at 10:11 PM, Joe Groff via swift-evolution <swift-evolution at swift.org> wrote:
> 
> I’d like to investigate separating Objective-C bridging from the behavior of the as/as?/is operator family again for Swift 4. Last year, I proposed SE–0083 <https://github.com/apple/swift-evolution/blob/master/proposals/0083-remove-bridging-from-dynamic-casts.md>, but we deferred the proposal for lack of time to evaluate its impact. As complicating factors, we now have source compatibility with Swift 3 as a requirement, and the id-as-Any work from SE–0116 <https://github.com/apple/swift-evolution/blob/master/proposals/0116-id-as-any.md> more or less requires bridging dynamic casts to work. 
> 

That decision still seems strange to me. For a change that necessarily involves source breakage, let’s defer until after we’ve pledged source compatibility. Huh?

Nevertheless, I’d be willing to put up with some source breakage for this, myself. The weird bridging behavior on “as” and friends is a good candidate for the single most confusing thing about Swift as it stands today.

Charles

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170302/0ebed7f6/attachment.html>


More information about the swift-evolution mailing list