[swift-evolution] [Pitch] Add Null struct to Foundation
J. Charles M. N.
jcharles.nmbiada at me.com
Fri Jun 24 00:59:01 CDT 2016
Doesn't Optional.None allready a placeholder for null values in swift?
I read some where that nil was the new way to represent null pointer in swift.
> Le 24 juin 2016 à 00:59, Michael Peternell via swift-evolution <swift-evolution at swift.org> a écrit :
> I think NSNull() should be used, not a struct. I don't think that a struct would be more performant. Or maybe the performance doesn't matter at all in any real-world usage scenario. But you may write a benchmark of a realistic (!) use-case (!) if you think otherwise... would be interesting to see the results.
> Keeping with NSNull() also simplifies objc-interoperability.
>> Am 23.06.2016 um 06:14 schrieb Alsey Miller via swift-evolution <swift-evolution at swift.org>:
>> Add a struct Null to the Swift 3.0 Foundation value types. As a struct, Null is more performant (no ARC or memory allocation) than NSNull, and will be needed for Swift JSON decoders and libraries that want to use struct value types, and be free from classes for their model layer.
>> swift-evolution mailing list
>> swift-evolution at swift.org
> swift-evolution mailing list
> swift-evolution at swift.org
More information about the swift-evolution