[swift-evolution] Pitch: Import Objective-C Constants as Enums

Douglas Gregor dgregor at apple.com
Fri Jan 29 12:36:00 CST 2016


> On Jan 22, 2016, at 1:14 PM, Jeff Kelley via swift-evolution <swift-evolution at swift.org> wrote:
> 
> I have updated the proposal <https://github.com/SlaunchaMan/swift-evolution/blob/import-objc-constants/proposals/0000-import-objc-constants.md> to use struct over enum (https://github.com/SlaunchaMan/swift-evolution/blob/import-objc-constants/proposals/0000-import-objc-constants.md <https://github.com/SlaunchaMan/swift-evolution/blob/import-objc-constants/proposals/0000-import-objc-constants.md>).
> 
>> On Jan 20, 2016, at 11:01 PM, Douglas Gregor <dgregor at apple.com <mailto: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.

Error codes are *usually* enums, but that’s a good point.

	- Doug


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160129/911fb5d9/attachment.html>


More information about the swift-evolution mailing list