StephenPelc[155] Call for Vote - Ambiguous condition in 16.3.3Proposal2020-09-02 11:16:03
Stephen Pelc
Call for Vote
Remove the ambiguous condition in 16.3.3
An ambiguous condition exists if a program changes the
compilation word list during the compilation of a definition
or before modification of the behavior of the most recently
compiled definition with ;CODE, DOES>, or IMMEDIATE.
The ambiguous condition permits systems to use the
<b>CURRENT wordlist to find the most recent name.
Given the variety and complexity of recent wordlist
structures, this apparent simplicity is rarely found
compared to just updating a pointer for each name.
StephenPelcNew Version: Call for Vote - Ambiguous condition in 16.3.3
An ambiguous condition exists if a program changes the
compilation word list during the compilation of a definition
or before modification of the behavior of the most recently
compiled definition with ;CODE, DOES>, or IMMEDIATE.
compiled definition with ;CODE, DOES>, or IMMEDIATE.
The ambiguous condition permits systems to use the
<b>CURRENT wordlist to find the most recent name.
Given the variety and complexity of recent wordlist
structures, this apparent simplicity is rarely found
compared to just updating a pointer for each name.
A Forth system may use the different memory sections for the different word lists (for example, it may use the different section for the system's and for user-defined word lists). This approach is used in SP-Forth. Changing the compilation word list causes changing the current section. So changing the compilation word list during compilation will produce incorrect code.
If we remove the mentioned ambiguous condition, we destandardize such Forth systems and prohibit such approach in implementations.
Also, by this changing, we, without any profit, destandardize and prohibit the approach when nt is actually created by semicolon ; (I uses this approach).
Concerning using CURRENT to find the most recent name — this approach is used in my system.
It seems for me that complexity of wordlist structures is an argument that it can have one more cell to keep the reference to its most recent nt.
Concerning the first argument: I have realized that a system is not allowed to break contiguous of the data space on changing the compilation word list (that was created via WORDLIST at least). So, it can only may take place for code space only, but it doesn't make much sense. So, the first argument can be discarded.
This proposal misses a discussion of existing practice. In particular, there have been significant discussions in comp.lang.forth about the issue, and my impression is that this issue was not clear-cut (but I may be misremembering).
It's not clear to may that
The ambiguous condition permits systems to use the CURRENT wordlist to find the most recent name. Given the variety and complexity of recent wordlist structures, this apparent simplicity is rarely found compared to just updating a pointer for each name.