-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing nullable operations? #16889
Comments
Furthermore, I expected |
See #9446 about
See also JuliaStats/NullableArrays.jl#111 and #16080 about missing arithmetic operators for Cc: @johnmyleswhite |
My experience with
But for (The order of arguments for |
I'll work on this later today and see if there is a nice solution. |
I think I have a reasonable solution, though I need to work out the details still. If |
I submitted a PR to NullableArrays: JuliaStats/NullableArrays.jl#115. Further discussion can move over there. |
Reopening as this should really go into Base, it has nothing specific to |
I'll note that #7903 is about to make numbers non-iterable/non-collectable. |
I don't think that affects the substance of this issue. A number is not a container (though it is convenient to promote it to a zero-dimensional container when necessary). Currently, this autopromotion is done transparently by allowing numbers to be treated as zero-dimensional containers of themselves. A |
#16961 should have closed this. |
I was surprised that
Nullable
doesn't supportmap
andfilter
. These are pretty common and idiomatic ways to work with Nullables in other languages. Are these operations missing, or was it a conscious decision to exclude them?It seems like it would be no issue to define filter:
the current behaviour is a non-working lazy
Filter
. I couldn't find a short way to express this operation currently.map
on the other hand is type-unstable, so I can see why it might not be included:That's unfortunate. If there's no way to fix that, then maybe there's no point in keeping
filter
either.The text was updated successfully, but these errors were encountered: