-
-
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
Use call for string to numeric conversion #10599
Conversation
@@ -409,12 +395,7 @@ for (f,t) in ((:int, Int), (:int8, Int8), (:int16, Int16), (:int32, Int32 | |||
(:int64, Int64), (:int128, Int128), (:uint, UInt), (:uint8, UInt8), | |||
(:uint16, UInt16), (:uint32, UInt32), (:uint64, UInt64), (:uint128,UInt128)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this list get Float32 and Float64 added to it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be handled by https://github.com/JuliaLang/julia/blob/sb/parsefloat/base/deprecated.jl#L312-L317
I don't want to rush any decisions, but this would be great to resolve one way or the other before packages like |
I guess this is ok. IIRC, our thinking used to be that for something as simple as a number, construction and conversion should be the same thing, and that parsing should be done explicitly since it is slow. |
Looks good to me. (A perfect example of where |
In this case, why do we need |
Yes, I think that's a bit of a problem. If we have both, it's not clear which one to call or define. If we use only constructors, then the interface to parsing is construction. However this doesn't make sense for all types. For example |
Fixes issue #10594.