Skip to content

Commit b0d8090

Browse files
gh-40: Clarify pointer behavior on deletion.
1 parent e335c81 commit b0d8090

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/SPECIFICATION.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,8 @@
307307
308308
- Freezing rule: creating a new pointer to a binding that is frozen or permanently frozen is forbidden. If the identifier `name` is marked frozen or permafrozen, evaluating `@name` raises a runtime error. An identifier that already has pointers bound to it may still be frozen or permafrozen; freezing prevents any *new* pointer aliasing from being created to that binding until it is thawed.
309309
310+
- Deletion behavior: when a variable is deleted using `DEL(name)`, the binding (value) is removed from the environment and the pointer state is erased. The symbol's static type information remains recorded, even after deletion. Subsequent assignment to the deleted identifier must match the original declared type, but reading the deleted identifier before a new assignment results in an undefined-identifier error.
311+
310312
Pointers are a convenience for aliasing and in-place update patterns; implementations should reflect pointer creation and dereference operations in the state log so that tracebacks and state replay remain deterministic.
311313
312314

0 commit comments

Comments
 (0)