[swift-evolution] Pitch: Import Objective-C Constants as Enums
zach at waldowski.me
Fri Jan 29 13:22:27 CST 2016
+1 one to the updated proposal. I like the change a lot, even if it's
even more pain for the poor framework teams. ;-)
Apropos of nothing, a coworker reminded me today of something that would
fit well into this proposal, even if only as a clarifying example: UTIs
are a great instance of "strongly-typedef'ed strings", with the
possibility of user-defined cases, and whose use in Cocoa APIs is often
ambiguous. There are several hundred constants, too, so it'd be a good
stress-test for everything in the proposal.
Cheers! Zachary Waldowski zach at waldowski.me
On Fri, Jan 22, 2016, at 04:14 PM, Jeff Kelley via swift-evolution wrote:
> I have updated the proposal to use struct over enum
>> On Jan 20, 2016, at 11:01 PM, Douglas Gregor
>> <dgregor at apple.com> wrote:
>> FWIW, I suggest that you put “String” somewhere in the title of your
>> proposal when you revise it.
> Would this need to be limited to strings? There are other “magic
> constants” that could conceivably be imported as structs—I’m thinking,
> for instance, error codes.
> Jeff Kelley
> SlaunchaMan at gmail.com | @SlaunchaMan | jeffkelley.org
> swift-evolution mailing list swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution