-
Notifications
You must be signed in to change notification settings - Fork 16
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
A couple future compatibility breakage thoughts #40
Comments
Hey, thanks for looking into this! It sounds like I should do a 1.2.7 release (which will have a bunch of new functionality like Once that's out, we can do a major version bump and look into some mild breaking changes.
|
You're absolutely right on the third point, idk why I thought otherwise. |
Tacking another on, the |
Agreed! |
Through working on signed ints, I had a couple ideas about changes that could potentially be beneficial to future maintainability.
Number
a sealed trait, not allowing outside implementations of it. It's hardly the only trait in the ecosystem that has functionality like that, and this crate gives an implementation for all its types, so I think it'd be good to seal off. Obviously technically breaking, but unlikely to make a huge impact given what it's used for internally.UInt
struct toAInt
(or similar) and share as much functionality as possible between signed and unsigned types once they're implemented. I'm not entirely sure how much that would be yet. This technically might not even have to be breaking if we just exportUInt
as a direct alias for the new type.#[non_exhaustive]
to make them impossible to directly construct and force users to acquire them through the public API. [If the only constructor was internal, I'd suggest making it a tuple struct since they can be a little comfier to work with, but that's an admittedly frivolous reason and wouldn't be breaking anyway.]The first and last are obviously breaking but once implemented would mean we could change implementation details with much less risk of breakage, and would lend itself to safer/more predictable use cases.
The text was updated successfully, but these errors were encountered: