swift
b9354862 - [AutoDiff] Rename `@differentiating` to `@derivative(of:)`. (#28481)

Commit
5 years ago
[AutoDiff] Rename `@differentiating` to `@derivative(of:)`. (#28481) Rename `@differentiating` to `@derivative(of:)`. `@derivative(of:)` more clearly evokes derivative registration; the syntax is otherwise unchanged. Deprecate `@differentiating`, to be removed in the next release. Discussed here: https://github.com/apple/swift/pull/28321#discussion_r347757647. Partially resolves TF-999. TF-1000 tracks updating all `@differentiating` usages across repositories. --- Confirmed via `grep -nr differentiating include lib stdlib test` that all remaining occurrences are intended. --- Example: ```swift extension Float { @derivative(of: +) static func vjpAdd(lhs: Self, rhs: Self) -> (value: Self, pullback: (Self) -> (Self, Self)) { (lhs + rhs, { v in (v, v) }) } } ```
Author
Committer
Parents
Loading