Skip to content

Commit d71c79f

Browse files
Add note on thunks (#402)
* Add note on thunks * Update docs/src/FAQ.md Co-authored-by: Lyndon White <[email protected]> Co-authored-by: Lyndon White <[email protected]>
1 parent 38d3929 commit d71c79f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/src/FAQ.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,13 @@ The list here is incomplete, but is vetted for quality.
9797

9898
- ["Evaluating Derivatives"](https://dl.acm.org/doi/book/10.5555/1455489) (by Griewank and Walther) is the best book at least for reverse-mode.
9999
It also covers forward-mode though (by its own admission) not as well, it never mentioned dual numbers which is an unfortunate lack.
100+
101+
## Is removing a thunk a breaking change?
102+
Removing thunks is not considered a breaking change.
103+
This is because (in principle) removing them changes the implementation of the values
104+
returned by an rrule, not the value that they represent.
105+
This is morally the same as similar issues [discussed in ColPrac](https://github.com/SciML/ColPrac#changes-that-are-not-considered-breaking), such as details of floating point arithmetic changing.
106+
107+
On a practical level, it's important that this is the case because thunks a bit of a hack,
108+
and over time it is hoped that the need for them will reduce, as they increase
109+
code-complexity and place additional stress on the compiler.

0 commit comments

Comments
 (0)