Skip to content
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

Float: FloatCore + Real #339

Open
tyilo opened this issue Oct 16, 2024 · 2 comments
Open

Float: FloatCore + Real #339

tyilo opened this issue Oct 16, 2024 · 2 comments

Comments

@tyilo
Copy link

tyilo commented Oct 16, 2024

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

@cuviper
Copy link
Member

cuviper commented Oct 16, 2024

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.

@tyilo
Copy link
Author

tyilo commented Oct 16, 2024

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

That was also my idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants