-
Notifications
You must be signed in to change notification settings - Fork 522
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
unit: clean up unit package #90
Comments
I'm not sure about the 4 point here. There is only a concrete |
Will ponder. |
What is the plan for the |
I've been thinking more about the Related to the combination behaviour point. The zero value should be usable for these; if the |
I think all that's left of this is point 3 |
Agreed |
The unit package has a lot of problems. These should be cleaned up. Here are my suggestions
unit.Millimeter
, instead just supply aunit.Milli
constant, so it can beunit.Milli * unit.Meter
. Slightly less pretty, but drastically reduces the API surface and makes it more composable with outside codeRedefine theUnit
combination methods to match themat
types. For example,Add
should take in two arguments and store to the receiverformatted
field fromUnit
. It introduces unnecessary statego generate
.The text was updated successfully, but these errors were encountered: