This repository has been archived by the owner on Nov 23, 2024. It is now read-only.
Purity-Information (former @pure
-Annotation)
#6
Labels
enhancement 💡
New feature or request
epic
An issue that groups several related issues together
purity
Inferring the purity of functions
Is your feature request related to a problem?
When working with notebooks, some functions are very resource-intensive and time-consuming to compute.
On the other hand, if you are doing exploratory work, it is necessary to calculate them many times.
Desired solution
To reduce computational cost and errors in development, functions that do not affect a global state should not be recomputed, and their results should be stored.
This is only possible if a function satisfies this criterion:
If a function has neither an influenceable read access nor an observable write access - the function is pure.
A function with at least one observable write access has side effects and is therefore impure.
Since a function with side effects must be re-executed each time, it would be useful to know the reason for these effects.
The information about whether a function is pure or has side effects is called Purity-Information.
The Purity-Information, as well as possible reasons for impurity, propagate from a called function to the calling function.
This makes manual inspection very difficult and prone to error - therefore Purity-Information should be inferred statically.
Possible alternatives (optional)
No response
Screenshots (optional)
No response
Additional Context (optional)
Subsumes the following issues:
The text was updated successfully, but these errors were encountered: