Skip to content

Chapter 12. AD in Modern Programming Languages

Lisp is one of the natural homes of automatic differentiation. It treats programs as data, has a simple expression syntax, and supports macro systems that can transform code...

SectionTitle
1Chapter 12. AD in Modern Programming Languages
2Functional Languages
3Differentiable Programming
4AD in C and C++
5AD in Python
6AD in Rust
7AD in Julia
8AD in Swift
9Type Systems for Differentiation
10Effect Systems and Mutation
Chapter 12. AD in Modern Programming LanguagesLisp is one of the natural homes of automatic differentiation. It treats programs as data, has a simple expression syntax, and supports macro systems that can transform code...
7 min
Functional LanguagesFunctional programming languages provide a natural semantic foundation for automatic differentiation. Programs are expressed as compositions of functions, immutable values,...
6 min
Differentiable ProgrammingDifferentiable programming treats differentiation as a general programming-language feature. A program can contain numerical kernels, control flow, data structures, solvers,...
8 min
AD in C and C++C and C++ are important targets for automatic differentiation because much scientific, engineering, graphics, finance, and machine learning infrastructure is written in these...
8 min
AD in PythonPython became the dominant language for modern machine learning and differentiable computing because it combines a simple programming model with access to high-performance...
7 min
AD in RustRust is an attractive language for automatic differentiation because it combines low-level performance with strong static guarantees. It gives the programmer control over...
9 min
AD in JuliaJulia was designed for high-performance technical computing. It combines interactive syntax with a compiler capable of specializing code aggressively based on types. This...
7 min
AD in SwiftSwift became an important experiment in language-integrated automatic differentiation because it attempted to make differentiation a core compiler feature rather than a...
7 min
Type Systems for DifferentiationAutomatic differentiation interacts deeply with type systems because differentiation changes the structure of computation. A derivative operator maps one function into another...
7 min
Effect Systems and MutationAutomatic differentiation is easiest to define for pure functions. A pure function behaves like a mathematical mapping: it consumes inputs, produces outputs, and has no...
7 min