num-traits: Tracking issue for potential breaking changes
num-traits is somewhat of a de facto stable crate. Since these traits are often found in the public API of other crates, we really want to avoid the sort of ecosystem split that a breaking-change semver bump might cause.
Nevertheless, it’s a good idea to track what breaking changes we might want to make someday, now found in the list below. Links are included to postponed issues, which often have more details. They will be closed in the meantime, but discussion can continue.
- Remove default
epsilonimplementation forFloat#4 Num::FromStrRadixErrshould have Trait bound #6- More features for
Float#8 - All bit twiddling functions in
num::traits::PrimIntshould take or returnusizeinstead ofu32#14 std::num::Checked{Add,Sub,Mul,Div}should have type parameters #15- Use
Mulby reference inpow#18 - Make the
Floattrait depend onFloatConst. #20 - Add
Default,Display, andDebugtrait bounds to PrimInt #44 - Easy conversions between
SignedandUnsigned#46 - Blanket
implforRealtrait prevents parameterized implementations. #49 - Functions to distinguish signaling from non-signaling NaN’s #51
- Bound
FloatCorebyBounded? #55 - Implement traits for
Reverse(rust 1.19+) #65 - Make
One::is_onea required method and remove itsSelf: PartialEqhttps://github.com/rust-num/num-traits/issues/5#issuecomment-370271019 LowerBoundedandUpperBounded(#210) should be super-traits ofBounded
About this issue
- Original URL
- State: open
- Created 9 years ago
- Comments: 17 (9 by maintainers)
It’s a lot of work growing a community! Thank you so much for all your contributions thus far, so much of the Rust community (and now for-profit companies) depend on your work and it’s going unappreciated.
What support and help can we give to help ship a new release with breaking changes? Which parts of releasing fill you with the most dread?
@cuviper The crate has known issues which can not be fixed without a breaking release. Personally, I would strongly prefer if first
num-traits v0.3with necessary changes was released first and only if it will require no breaking changes for a certain amount of time (e.g. one year), release it as v1.0 via semver trick.Cutting a 1.0 release because you don’t have enough time to work on the crate is not a great practice in my opinion, especially for a core crate. Maybe you could attract additional maintainers via announcement on URLO/Reddit/etc?
@Elizafox yes, but even better put them in a separate crate so they can be versioned separately.
I was talking primarily about the
NumCasttrait. Probably deprecating it in favor ofFrom/TryFromshould be considered as well.I know I’m just a rando, but if I may make a suggestion, perhaps you could namespace breaking traits as a stopgap? It’s less maintainership burden, doesn’t involve the burden of supporting multiple releases, and solves the immediate problem.
maybe like
num-traits::experimental::etc. Once things there are stabilised, and you’re ready to release them, you can release them as the defaults in 0.3.x or whatever.