Description
My apologies if this has been suggested before:
While ForwardDiff is not the heaviest of packages in the ecosystem, it's also not exactly lightweight (take 1.6 seconds to load on my system). A lightweight package AbstractDualNumbers.jl or ForwardDiffBase.jl (or similar) that just defines something like abstract type AbstractDualNumber{Tag} <: Real end
and things like function AbstractDualNumbers.value end
and function AbstractDualNumbers.partials end
could allow packages to define custom push-forwards without depending on ForwardDiff itself.
I know that there are exciting efforts underway in the Julia-AD-ecosystem for new ADs (e.g. Diffractor), but ForwardDiff is certainly not going away any time soon. A really lightweight way to define push-forwards could reduce the frequency of @require ForwardDiff
in the ecosystem quite a bit, and also make it possible to move code from packages like DistributionsAD to Distributions, etc.