-
Notifications
You must be signed in to change notification settings - Fork 21
== and missing values #74
Comments
This issue is actually closely related to JuliaLang/julia#13207. If I'm not saying that's a good idea, but that's another data point in that discussion. |
Let's just submit a PR to Base that uses the natural lifting semantics for I really don't want us to waste our time discussing these kinds of issues until we have a more polished package that people can use with confidence that it's both correct and performant. I find these theory-world level design debates fairly poisonous and I've wasted too much of my life negotiating semantics when I should have just been writing more code. |
By "natural lifting semantics", do you mean my proposal, or the current behaviour in NullableArrays.jl? |
I mean the semantics we use for all the math operations |
I would be fine with that. |
I've just found out this: julia> Nullable(1) == Nullable()
ERROR:
[inlined code] from error.jl:22
in == at /home/milan/.julia/NullableArrays.jl/src/operators.jl:55
julia> Nullable(1) == Nullable{Int}()
Nullable{Bool}() The bug is only the check for |
I would expect
==(::Nullable, ::Nullable)
to returnNullable()
when one of the arguments is missing, instead of raising an error -- and defer the error to the point when the code callsget
(if it does). What do you think?For reference, the current behavior is:
PS: I guess
==(::Nullable, ::Nullable)
is supposed to get merged into Base at some point?The text was updated successfully, but these errors were encountered: