Here is the origin of the discussion I want to have.
I had to leave the development a few years ago due to somewhat misfortunes. I apologize for the inconvenience.
Unfortunately, no progress has been made in FixedPointNumbers or CheckedArithmetic over the last few years regarding arithmetic.
Rather, the LoopVectorization (VectorizationBase) glow of hope is about to fade.
Given this situation, I beleave that functions like saturating_add (or saturated_add) are better defined in julia’s Base.
The reason they should be under Base is that they should correspond closely to LLVM’s saturating intrinsics.
Yeah, I don’t know if it is easier in the long run to add new intrinsics to Base or somehow ensure the clampwiden optimization gets applied correctly in future LLVM/Julia versions.
No matter how smart julia or LLVM gets, there should always be definitions of what to call them.
For example, the function (not functionality) of saturating arithmetic for types in Dates should be the same as the function of saturating arithmetic for Integers.
(I doubt that saturating arithmetic should be implemented in Dates, though.)
Even if julia supports saturating arithmetic in the future, an external package is needed to supplement its functionality to support versions prior to v1.11.
VectorizationBase.jl was one of the candidates, but as noted above, we now consider it inappropriate.
I had CheckedArithmeticCore.jl as a candidate for that, but now there is another candidate OverflowContexts.jl