-
Notifications
You must be signed in to change notification settings - Fork 103
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
Implement One
and Zero
from num-traits
#113
Comments
What exactly are you suggesting? A blanket impl won't work because It would probably make sense for you to just write |
I meant a blanket impl for Otherwise an automatic |
The only thing that would be possible from the type system's perspective is a blanket impl of |
It would be useful if any
Field
would implement theOne
andZero
traits fromnum-traits
(and perhaps even more?). One application would be the use innalgebra
, see for example the requirements to multiply two matrices there. See also this issue.I think it would make most sense to put it behind an enabled-by-default feature. It would be possible to have a blanket implementation for
Field
, or alternatively an implementation could be added to the derive macro. Which would be the best way?The text was updated successfully, but these errors were encountered: