On Tuesday, January 6, 2015 4:43:16 AM UTC-8, Milan Bouchet-Valat wrote: > > > > > > Yeah, (==){T}(a::Nullable{T}, b::T) should be able to be defined as > > !isnull(a) && get(a) == b > I'd consider this definition (which is different from the ones I > suggested above) as unsafe: if `a` is `null`, then you silently get > `false`. Better provide additional safety by either returning a > `Nullable`, or raising an exception. >
But - if "null" is just another legitimate value, why wouldn't it make sense to define "null != a" for all (a != null)? Why must we treat it as some sort of special abstraction? We don't do this with, say, imaginary numbers. (Identity for null is a separate issue).