[swift-evolution] [Pitch] Reducing the bridging magic in dynamic casts

Chris Lattner clattner at apple.com
Mon May 2 17:15:59 CDT 2016


> On May 2, 2016, at 2:48 PM, Erica Sadun <erica at ericasadun.com> wrote:
> 
> 
>> On May 2, 2016, at 3:45 PM, Chris Lattner via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>> NSError bridging can also be extracted from the runtime, and the same functionality exposed as a factory initializer on NSError:
>>> 
>> 
>> I think that this proposal is overall really great, but what does it do to the “catch let x as NSError” pattern?  What is the replacement?  If the result is ugly, we may have to subset out NSError out of this pass, and handle it specifically with improvements to the error bridging story.
> 
> Grant me the serenity to accept the `NSError` I cannot change and the courage to change the bridging conversions I should. Grant me the wisdom to know the difference between a partial solution that offers a cleaner more predictable interface set now and a full solution that cannot be achieved in a reasonable timeframe.

I’m not sure what you’re saying.

-Chris

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


More information about the swift-evolution mailing list