2 ms·
I wonder if this feature is in any way different from LINQ for expressions? In C# you can say Expr<Func<float,float>> sin = Math.Sin; And then write a func
by lostmsu 8y ago
I wonder if this feature is in any way different from LINQ for expressions?
In C# you can say
Expr<Func<float,float>> sin = Math.Sin;
And then write a function
Expr Derivative(Expr expr) => ...
Which will take the above sin, and compute its derivative as another Expr, which can be later compiled using Expr.Compile()
In C# this has been introduced to make SQL bindings.
So far, the only difference I see is that in C# there's a distinction between expression trees and functions themselves, but in Julia there's not.
- StefanKarpinski 8y agoThis isn't really a blog post about a specific language feature so your question doesn't make too much sense to me, which may be why it hasn't gotten any answers. In general, being able to map specific primitives to their derivatives is not sufficient for AD, although I'm sure AD is possible in C#, it's just considerably more involved than that.