that's why the comment you're replying to says 'at least an embedded domain-specific language', kepler boy
this is less true for forward-mode automatic differentiation, which you can do a pretty reasonable job of in python as just a dual-number class which you can pass to many, though not all, ordinary numerical computation functions. unfortunately forward-mode automatic differentiation is unusably slow for gradients with respect to large parameter vectors
> you can't really implement it in a library in a normal programming [...] you have to implement it in a programming language, at least an embedded domain-specific language
So which is it?