danlehmann / arbitrary-int

A modern and lightweight implementation of arbitrary integers for Rust
MIT License
31 stars 12 forks source link

A couple future compatibility breakage thoughts #40

Open vortexofdoom opened 7 months ago

vortexofdoom commented 7 months ago

Through working on signed ints, I had a couple ideas about changes that could potentially be beneficial to future maintainability.

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.

danlehmann commented 7 months ago

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 wrapping_add() and friends).

Once that's out, we can do a major version bump and look into some mild breaking changes.

vortexofdoom commented 7 months ago

You're absolutely right on the third point, idk why I thought otherwise.

vortexofdoom commented 1 week ago

Tacking another on, the BITS constants for the primitive types are u32 rather than usize, as is the return type for their count_ones and similar methods, and I think that's a reasonable change to make.

danlehmann commented 1 week ago

Agreed!