Digest #82 2019-09-14
[COMPILE]) should be tweaked to properly work for the words that are created by
SYNONYM in the reference implementation. Actually, they should use
EXECUTE-COMPILING (see an example in a comment for POSTPONE).
Perhaps the corresponding note should be appended into "Implementation" section.
Please take into account that proposed change also affects (very rightful) the words that are created by
SYNONYM (in the current revision), since execution semantics for them are not specified.
At the moment, the words that are created by SYNONYM, may be ticked. But the execution semantics of the newname may be unequal to the execution semantics of the oldname, and they are unequal in the most cases in the reference implementation of
An example (according to the the reference implementation).
SYNONYM FOO 0=
- The interpretation semantics are equal.
- The compilation semantics are equal.
- The execution semantics are not equal.
This inequality can be shown by the following code:
: [E] EXECUTE ; IMMEDIATE 0 ' 0= ] [E] [ . \ prints -1 0 ' FOO ] [E] [ . \ prints 0 (or even throw exception)
NB: it is not a mistake of the reference implementation, since such behavior of
SYNONYM is allowed by the specification.