-
-
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
Enhancement request: isempty(::Nothing) = true #35438
Comments
What's the justification? To me, this looks like a random type and a random function with a random return value. Asking "what breaks" isn't really useful because it means that pretty anything that used to be an error can be made to have an arbitrary implementation. |
We've run into a situation where we can expect one of Edited to add: the reason I asked "what breaks?" is because frequently, enhancement requests have already been considered by the core team and there's a reason that they haven't been implemented. Perhaps I should've been more explicit but I didn't expect that to be the thing upon which we got hung. Feel free to read that as "has the core team considered this already, and if they did, what was the reason it wasn't implemented?" |
So just do it?
This is a consequence of numbers being iterable which there has been a lot of discussion about (#7903).
But you can have a |
The convention surrounding |
I must echo Kristoffer in that this seems like an implementation detail of your particular system that you advocate leak into If you interpret Furthermore, in your case, the alternative (namely |
I guess since there's a reasonable way to do this it doesn't merit further discussion. Thanks for the input. |
ref #26350 |
(that's |
What breaks if we implement
isempty
forNothing
?(Does it make sense to implement
iterate
forNothing
?)The text was updated successfully, but these errors were encountered: