[swift-evolution] Swift's Optional Int as NSNumber in Objective-C

Kenny Leung kenny at mail.hexdreams.com
Sun May 14 22:52:03 CDT 2017


> On May 12, 2017, at 9:56 AM, John McCall via swift-evolution <swift-evolution at swift.org> wrote:

> Exporting Int? as an optional NSNumber does not feel obvious and idiomatic when we would export Int as NSInteger.  It feels like reaching for an arbitrary solution.

I don’t understand this reasoning. I’ve had cause to distinguish 0 from null in both Objective-C and Java, and I would do exactly the same thing.

-Kenny



More information about the swift-evolution mailing list