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

Make the Float trait depend on FloatConst. #20

Closed
nical opened this issue Dec 30, 2017 · 4 comments
Closed

Make the Float trait depend on FloatConst. #20

nical opened this issue Dec 30, 2017 · 4 comments

Comments

@nical
Copy link

nical commented Dec 30, 2017

In my (arguably limited) experience with using the num traits, FloatConst is most of the time used along with Float. It would simplify a lot of type signatures if the Float trait bound implied FloatConst.
I'll happily submit a PR if the idea is sound.

@cuviper
Copy link
Member

cuviper commented Dec 30, 2017

It's a breaking change to extend a trait that way.

Ideally, we might not have made FloatConst separate at all, just adding those directly to Float, but we'd have to provide defaults for any new trait items too.

For your own crates, you could create a local meta-trait that requires the Float + FloatConst combination though.

@nical
Copy link
Author

nical commented Dec 30, 2017

Yeah. That's just a paper cut and I totally understand if it isn't worth making a breaking change just for that. If there's any plan to do a breaking change for whatever other reason It would be great to take this occasion to consolidate more features into the Float trait.

@cuviper
Copy link
Member

cuviper commented Dec 31, 2017

I'm considering a semver bump for #16, but only to tweak features, not any breaking API change. But we can keep this issue for some future API cleanup.

@cuviper
Copy link
Member

cuviper commented Mar 5, 2018

I've decided to limit the clutter of breaking change issues, so they will now be tracked collectively in #47. I'm closing this issue for now as postponed but we can still discuss its merits here as needed.

@cuviper cuviper closed this as completed Mar 5, 2018
@cuviper cuviper removed this from the num-traits-0.x milestone Mar 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants