Description
From the beginning of this package, I have believed that the dependencies on this package would bring in trouble. (cf. JuliaMath/FixedPointNumbers.jl#146 (comment))
The "features" provided by CheckedArithmetic
are on a higher level than packages that provide types like FixedPointNumbers
. The dependency of a low-level package on a high-level package leads to roughly two problems.
-
Keeping up with compatibility
UntilCheckedArithmetic
reaches v1.0, packages that provide numeric types are implicitly required to keep up with the new version when there are changes to the implementation or functionality ofCheckedArithmetic
, even if they do not break the existing API. -
Weight limit of
CheckedArithmetic
IfCheckedArithmetic
is "heavy", it affects all users of the package which (indirectly) depend on the package providing the numeric types. Therefore,CheckedArithmetic
is implicitly required to be lightweight. I suspect that theCassette
's injection feature could be useful in "end-user" code, but I don't think it is a good idea for packages which provide numeric types to be dependent onCassette
.
I would like to make the CheckedArithmetic
support not only checked
arithmetic, but also wrapping
and saturating
arithmetic. (cf. JuliaMath/FixedPointNumbers.jl#152 (comment)) And in the future, I would like to integrate the features into Base
(Base.Checked
). With this perspective, I think it would be beneficial to make the APIs and the implementations separate.