Skip to content

Commit af9c2bc

Browse files
committed
Explain the potential Outer in docs
1 parent 6f3e723 commit af9c2bc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/docs/reference/other-new-features/safe-initialization.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ The theory is based on type-and-effect systems [1]. We introduce two concepts,
218218
_effects_ and _potentials_:
219219

220220
```
221-
π = C.this | Warm[C, π] | π.f | π.m | C.super[D] | Cold | Fun(Π, Φ)
221+
π = C.this | Warm[C, π] | π.f | π.m | C.super[D] | Cold | Fun(Π, Φ) | Outer(C, π)
222222
ϕ = π↑ | π.f! | π.m!
223223
```
224224

@@ -231,6 +231,7 @@ Potentials (π) represent values that are possibly under initialization.
231231
- `C.super[D]`: essentially the current object, used for virtual method resolution
232232
- `Cold`: an object with unknown initialization status
233233
- `Fun(Π, Φ)`: a function, when called produce effects Φ and return potentials Π.
234+
- `Outer(C, π)`: the potential of `this` for the enclosing class of `C` when `C.this` is ` π`.
234235

235236
Effects are triggered from potentials:
236237

@@ -247,6 +248,9 @@ initialized.
247248
For an expression `e`, it may be summarized by the pair `(Π, Φ)`,
248249
which means evaluation of `e` may produce the effects Φ and return the
249250
potentials Π. Each field and method is associated with such a pair.
251+
We call such a pair _summary_. The expansion of proxy potentials and effects,
252+
such as `π.f`, `π.m` and `π.m!`, will take advantage of the summaries.
253+
Depending on the potential `π` for `this`, the summaries need to be rebased (`asSeenFrom`) before usage.
250254

251255
The checking treats the templates of concrete classes as entry points.
252256
It maintains the set of initialized fields as initialization

0 commit comments

Comments
 (0)