next up previous contents index
Next: Visions Up: An Example Previous: Regression   Contents   Index


Early Binding

Early binding permits access to the definition of an individual word that was visible when a thought was compiled. Normally, the definition of a particular word is a function of the understanding in which the thought that contains a reference to it is pondered. This is late binding, or more particularly, since scoping is not lexical, dynamic binding. The word REALLY compiles a literal containing a copy of the pfa of the word following it. This is sufficient to reference a variable, as this is its address. To execute a colon definition that is early bound by REALLY, the word DID is required. DID executes a colon definition given its pfa in a manner analogous to the way that EXECUTE executes a colon definition given its cfa.

The thought { X ? } pondered in snooze displays the value of X in the understanding of snooze, but the thought { REALLY X ? } displays the value of X in the understanding of reality, since the thought was compiled in reality, even though it is pondered in snooze. This demonstrates early binding to variables. Early binding to colon definitions is demonstrated in the next two examples. When the thought { X @ . } is pondered in FOO, the definition of . imagined in FOO is used to display the value of X, but when the thought { X @ REALLY . DID } is pondered in FOO, the definition of . that was active in reality, when the thought was compiled, displays the value of X without the leading zeros.


next up previous contents index
Next: Visions Up: An Example Previous: Regression   Contents   Index
Robert J. Brown
1999-09-26