You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
The motivation is increasing re-usability of
Base
code, in particular from theBitIntegers
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 inBitIntegers.jl
. It would be great to have a type hierarchy likeAnd 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 ofAbstractBitSigned
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).
The text was updated successfully, but these errors were encountered: