You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful if any Field would implement the One and Zero traits from num-traits (and perhaps even more?). One application would be the use in nalgebra, 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:
What exactly are you suggesting? A blanket impl won't work because One and Zero are defined in num_traits, and blanket impls can only be defined for traits defined in the same crate.
It would probably make sense for you to just write num_traits::{Zero, One} impls for your field types.
The only thing that would be possible from the type system's perspective is a blanket impl ofField for types which impl some combination of num-traits traits, but that probably doesn't make practical sense
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: