Distances + ChainRules
Are the maintainers of this package open to ChainRules-centric PRs? ie. are you happy to host "AD recipes" in this package?
The consensus is that the "correct" place for rules is in the package that defines the functions (otherwise it's type-piracy), in the same way that recipes for RecipesBase for plotting are hosted in the same package as the things that you want to plot using them.
An additional dependency on ChainRulesCore will be required, but as you can see from it's Project.toml, it is very lightweight.
but as you can see from it's Project.toml, it is very lightweight.
Distances.jl is also very lightweight, for example
julia> @time using Distances
0.039016 seconds (32.86 k allocations: 3.181 MiB)
but with ChainRulesCore as a dependency:
julia> @time using Distances
0.092615 seconds (88.67 k allocations: 6.465 MiB)
Sure. So is that a tradeoff you're willing to make so that Distances can be made to work with AD?