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

Charles Srstka cocoadev at charlessoft.com
Sat May 7 00:18:47 CDT 2016


On the downside: This is absolutely true. All of those conversions would be the first up against the well when the revolution comes.

On the upside: I imagine a compiler warning could be pretty reasonably whipped up to detect these, and after the dust cleared, we’d be able to just try Int32(foo) and either the initializer would exist, or it wouldn’t, and it wouldn’t be necessary to bust out a playground and test to see if it’ll actually work every time you want to cast something to a number type that’s not your basic Int or Float.

Charles

> On May 6, 2016, at 11:01 PM, Jacob Bandes-Storch <jtbandes at gmail.com> wrote:
> 
> Agreed, but I'm sure lots of user code depends on it (e.g. when extracting numeric values from property lists). If it stopped working, wouldn't these "as?" casts silently start returning nil where they didn't before?

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


More information about the swift-evolution mailing list