Uh oh!
There was an error while loading. Please reload this page.
Extract math from Float trait - #925
Conversation
Diggsey
commented
Mar 3, 2015
A single math trait doesn't make sense: the set of mathematical operations on floats is very different from those on integers, or even decimal or fixed point numbers. |
hauleth
commented
Mar 5, 2015
I agree that there should be more traits, but on the other hand we shouldn't go insane with splitting them just for having generic code for any numeric type. It should be carefully evaluated. |
aturon
commented
Mar 5, 2015
To be clear, the earlier RFC had this as an explicit goal:
As that RFC discusses, there was a long history of changes to The role of the current traits is primarily just to provide methods on the primitive numeric types, because they cannot be given inherent methods. |
aturon
commented
Apr 3, 2015
The float trait has been removed in favor of inherent methods. I'm going to close this RFC, since it no longer applies. FWIW, generic programming over numeric types is a very important area of focus, but this is why we want to let a design bake in crates.io rather than freezing something suboptimal. |
Rendered.