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

Feature request: add an AbstractBitSigned type #37752

Open
rfourquet opened this issue Sep 25, 2020 · 1 comment
Open

Feature request: add an AbstractBitSigned type #37752

rfourquet opened this issue Sep 25, 2020 · 1 comment

Comments

@rfourquet
Copy link
Member

The motivation is increasing re-usability of Base code, in particular from the BitIntegers package.
A bunch of functions are defined for a limited set of types, like Base.BitSigned, but their code would apply as well for any signed "bits" types, so it was copy-pasted in BitIntegers.jl. It would be great to have a type hierarchy like

abstract type AbstractBitSigned <: Signed end
abstract type AbstractBitUnsigned <: Unsigned end
const AbstractBitInteger = Union{AbstractBitSigned,AbstractBitUnsigned}

And then define more functions against these types instead of the closed lists in Base.BitSigned et al.
Re-using the Base.BitSigned name to make it an abstract type instead of AbstractBitSigned would also work, but I don't know how much code this would break.

Making this happen is probably not a simple PR for me as it involves touching C code, hence only an issue (for now at least).

@rfourquet
Copy link
Member Author

Bump. If this would be OK in principle, I might still try to make a PR.

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

1 participant