-
Notifications
You must be signed in to change notification settings - Fork 1
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
Unitful.string
is actually Base.string
#12
Comments
Thank you for your feedback, @sostock. Indeed, since I understand that the current Changing the current implementation to extend Conversely, I have a question: other than the above, do you plan to change the |
Yes, type piracy is the only way to get something like this working without incorporating it in
Yes, I think this should be done as it is less confusing and would have no effect on existing code that uses this package.
I currently have no plans to change the |
Thanks for the reply. I just changed
OK, thanks! As soon as I finish the doctoral course, I will try this one. |
This package extends
Unitful.string
. ButUnitful
does not define astring
function, so it actually extendsBase.string
. Calling itUnitful.string
just seems confusing to me. Is there a reason for doing it like this?It also means that this package would break if an actual
Unitful.string
function is defined inUnitful
(the function in this package would then no longer extendBase.string
but insteadUnitful.string
, which might have a different purpose and might not even be exported).Also, irrespective of whether extending
Unitful.string
orBase.string
, this is type piracy. It might be better to define aUnitfulParsableString.string
function. It could have a fallback method that callsBase.string
so that it can be used as a replacement. Of course, this would be a breaking change.What do you think of this?
The text was updated successfully, but these errors were encountered: