num-traits icon indicating copy to clipboard operation
num-traits copied to clipboard

Float: FloatCore + Real

Open tyilo opened this issue 1 year ago • 2 comments

Is there a reason that Float doesn't have FloatCore and Real as super traits?

tyilo avatar Oct 16 '24 19:10 tyilo

That's mainly an artifact of history, since Float came first, and it's a breaking change to add a super trait.

I think it would also cause method resolution ambiguity in the current state, since any T: Float context would have multiple overlapping method names in scope. If we ever do make that breaking change, Float should only add distinct methods over its super traits.

cuviper avatar Oct 16 '24 19:10 cuviper

If we ever do make that breaking change, Float should only add distinct methods over its super traits.

That was also my idea.

tyilo avatar Oct 16 '24 19:10 tyilo