-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Open
Labels
designDesign of APIs or of the language itselfDesign of APIs or of the language itselffeatureIndicates new feature / enhancement requestsIndicates new feature / enhancement requests
Description
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).
Metadata
Metadata
Assignees
Labels
designDesign of APIs or of the language itselfDesign of APIs or of the language itselffeatureIndicates new feature / enhancement requestsIndicates new feature / enhancement requests