I don’t see how we need any language features for that. AD is just a library. There are AD libs even for Java. In Kotlin you can do a nice DSL for AD with blackjack and hookers operators overloading.
elizarov
10/22/2018, 7:30 AM
(correct me if I’m wrong, please)
t
thomasnield
10/22/2018, 10:56 AM
Yeah sure this has been done at a library level before (or highly specialized languages), but in my mind it seems AD at the compiler level would be valuable. I sometimes find myself wishing I could just tell the compiler "take this loss function expressed in pure Kotlin and derive it with respect to x". For long nasty summations especially this would be nice.
Admittedly I need to explore this more though, and you might be right. I don't know what the implications would be in terms of scope and implementation.