Skip to content

Commit 868936f

Browse files
authored
Remove outdated "pure" function wording
Closes #2238 I think in the past the API was more aligned with a "pure" function but has since drifted pretty far from that.
1 parent ae6e9ab commit 868936f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

working/macros/feature-specification.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,11 @@ written macro can cause. A well-behaved macro should not:
10451045
done.
10461046

10471047
* Produce different results when run multiple times on the same code. A macro
1048-
should be a [pure function][] from input code to resulting code.
1048+
should be a idempotent, and should always generate the same declarations
1049+
from the same inputs.
1050+
1051+
* Use mutable global state to pass objects or information derived from one
1052+
phase to a macro (even itself) running in a later phase.
10491053

10501054
The macro system is *not* designed to provide hard security guarantees of the
10511055
above properties. Users should consider the macros that they apply to be trusted

0 commit comments

Comments
 (0)