[swift-evolution] Proposed changes to SE-0033 Import Objective-C Constants as Swift Types

Ben Rimmington me at benrimmington.com
Mon Jun 6 23:42:50 CDT 2016

Michael Ilseman wrote:

> The biggest issue with the proposal as written is with importing a typedef
> as an enum. Enums do not allow us to control the underlying storage,
> and thus we would constantly be paying a bridging cost in its use.
> [...]
> The second issue concerns importing bridged typedefs, e.g. NSString.
> In that case, we want the underlying storage to be NSString,
> but present it as a String to the users.

(Sorry, ignore my previous reply. I thought that "bridging cost" meant
converting between String and NSString).

Instead of _ObjectiveCBridgeable, are you using `unsafeBitCast` for
toll-free bridging?

-- Ben

More information about the swift-evolution mailing list