> Not really. What is the type of Optional.none? `let empty = Optional.none` 
> does not compile, it says "Generic parameter 'Wrapped' could not be 
> inferred". NSNull() is a unique concrete value, and it's compatible with 
> Objective C, NSObject and AnyObject. We could of course use 
> `Optional<Int16>.none`, but someone else may use `Optional<AnyObject>.none` 
> instead. The extra type information is just misleading in this case.

If you want a single, unique value, use `()`.

But I'm not sure why you wouldn't just make this member an Optional<Any> in the 
first place. Is there some reason that wouldn't be suitable?

-- 
Brent Royal-Gordon
Architechies

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to