[swift-evolution] Promote "primitive" types to enums in extensions
andrey at tarantsov.com
Fri Mar 25 08:20:02 CDT 2016
> I think I may be similarly misunderstanding your proposal; your intention then is to import the type as an enum with raw value (to facilitate the conversion to/from the C code) but without exposing that raw value on the Swift side?
> In that case I think I’m in favour.
But perhaps not through the originally proposed syntax. I don't think this is an extension — it's more of an external annotation on C code, something that we don't currently support for user code. (My understanding is that they have it implemented for Apple frameworks.)
Perhaps, with Swift 3 going Linux, with should expose the ability to annotate external code to the users? And enum importing could be a part of that.
More information about the swift-evolution