[swift-evolution] [pitch] Make swift enum string available to Objc
Derrick Ho
wh1pch81n at gmail.com
Mon Feb 20 18:07:59 CST 2017
Swift should not forsake objective-c. At least not when it comes enum
strings. Although swift enums are suppose to be swift only, I think we
should add a new attribute to slightly relax that. I think a good
attribute would be @objcstring.
By adding @objcstring, an objective-c exclusive class will be generated.
@objcstring
enum Planet {
case Jupiter
}
I have written up a proposal with more details on what it would look for
objective-c.
https://github.com/wh1pch81n/swift-evolution/blob/swift-enum-objc/proposals/NNNN-Swift-enum-strings-ported-to-Objective-c.md
If no one objects to this proposal I'll submit it.
**notes: I am reviving this discussion so that I may submit this for Swift
4 stage 2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170221/5097242e/attachment.html>
More information about the swift-evolution
mailing list