-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
isnumber(::Number)
undefined
#23767
Comments
What do you want it to do? It's for checking if a character is a number so do you want it to be |
Yes, it does what's documented, but the name makes this quite confusing. It should at the very least have a better name or be scoped to a string-specific module. There has previously been talk of folding all character class checks into a single function with an enum argument for the class. |
Sorry, yes, I would suggest |
Maybe this should be renamed to |
So this can be closed and any discussion about changing the name should go to #14347 where previous discussion is. It doesn't make sense to define |
So let's reopen #14347? :-) |
Is there a reason
isnumber(::Number)
is left undefined? There are a billion other ways to check for it, I guess, but it's a bit odd that it has only been defined as a function onChar
. I don't have a good use case for it, just one of surprise that the function tab-completed but didn't do what I expected. And also that I define my ownisnumber
withisnumber(::Number) = true
. Would be nicer just to extend the one in Base with my own types, so other people wouldn't have to overwrite myisnumber
for their personal number types that for some reason don't inherit fromNumber
.The text was updated successfully, but these errors were encountered: