Closed as not planned
Description
Right now, only the constructors with keyword arguments are part of the public API for ADTypes.
This is problematic because e.g. AutoForwardDiff(; chunksize, tag)
is type-unstable while AutoForwardDiff{chunksize,typeof(tag)}(tag)
is not.
As a result, DI (and probably other packages too) are forced to use undocumented internal API that may break without notice whenever they want to construct backends efficiently. I suggest we document type-stable variants of every constructor when possible, even if it means adding fallbacks when the number of type parameters increases. For instance, if someday there is an AutoForwardDiff{chunksize,T,whatever}
, then AutoForwardDiff{chunksize,T}(tag)
should still work.
Related:
Metadata
Metadata
Assignees
Labels
No labels