JuliaDiff / DiffRules.jl

A simple shared suite of common derivative definitions
Other
74 stars 38 forks source link

closed under packages? #65

Open amrods opened 2 years ago

amrods commented 2 years ago

I'm willing to define some rules for SpecialFunctions, however some of the derivatives require functions not implemented in SpecialFunctions but in say GSL.jl. Is there any style convention for only allowing rules that are closed under derivation in the same package? I suppose the worst that can happen is that a user would get an undef error if they try to use a rule that requires GSL.jl but they have not loaded it before.

mcabbott commented 2 years ago

This sounds OK to me, better than not having the rules, or unconditionally loading. I don't see a way to make a very friendly error message, sadly... it's a pity that GSL doesn't have a more verbose descriptive name.