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.

-Michael

> Am 23.06.2016 um 06:14 schrieb Alsey Miller via swift-evolution 
> <swift-evolution@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.
> 
> 
>       Coleman,
> 
> 
> 
> 
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution@swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to