[swift-evolution] [Review] SE-0058: Allow Swift types to provide custom Objective-C representations

Kevin Lundberg kevin at klundberg.com
Wed Apr 6 20:15:46 CDT 2016



On 4/6/2016 1:22 PM, Russ Bishop wrote:
> The original intent was to be available on platforms that have an
> Objective-C runtime (Darwin only at the moment, I guess in theory
> Windows if someone were determined enough).
>
>
> You bring up a good point; there is nothing in the protocol that
> absolutely requires Objective-C, only that it requires AnyObject be
> the root object type. 
>
> However in some hypothetical world where we support importing C++
> types, Rust types, or JavaScript (only half trolling) types it would
> be nice for this protocol to have something tying it to the idea that
> we are bridging to the Objective-C/corelibs-foundation runtime
> specifically.
>
>
> Russ

Good point. I was going to suggest breaking out the protocol into a
general swift version and have an objective-c specific one refine it,
but in the case where bridging to other languages happens, those other
language specific bridging protocols wouldn't be able to refine the
generic base protocol for types that want to bridge more than one
language. I formally retract my concern :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160406/e18f7f2a/attachment.html>


More information about the swift-evolution mailing list