3 ms·
AD in the core language? Why? Automatic differentiation would be prime candidate to be implemented as a metaprogramming library.
by layoutIfNeeded 6y ago
AD in the core language? Why? Automatic differentiation would be prime candidate to be implemented as a metaprogramming library.
- Someone 6y agoThe choice may have been made because Swift doesn’t support meta programming well enough to do it well purely in a library. The plan they have/had (https://github.com/apple/swift/blob/main/docs/DifferentiableProgramming.md https://github.com/apple/swift/blob/main/docs/Differentiable...) claims “First-class language support for differentiation will enable convenient, extensible, and performant differentiable programming in Swift - more so than library-based approaches”.
- pcr910303 6y agoI think OP is claiming that if Swift had better meta programming abilities that GP have suggested, differentiable programming would have been a prime example for a good use of the capability.
- breatheoften 6y agoIf the language defines a way for you to ask the program for the computation graph in order to differentiate -- couldn't you add meta programming functions on top of that computation graph? Seems to me like there's at least an argument that it should be possible grow diff programming into a general purpose meta programming system rather than use general purpose meta programming as implementation mechanism for differentiable programming ...