Sujet : Re: single-xt approach in the standard
De : ruvim.pinka (at) *nospam* gmail.com (Ruvim)
Groupes : comp.lang.forthDate : 18. Sep 2024, 09:15:47
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vce27k$3unj9$3@dont-email.me>
References : 1
User-Agent : Mozilla Thunderbird
On 2024-09-17 14:54, Ruvim wrote:
Do you think that the Forth standard should recognize the classic single-xt approach as possible for implementing a standard Forth system?
The classic single-xt approach implies that only one execution token (xt) is associated with a name token (nt), and only one name token is associated with a word (a named Forth definition). And words whose compilation semantics differ form default compilation semantics are implemented as immediate words.
Or, a different question (because you could have another point of view):
Do you think that the Forth standard should recognize the classic single-xt approach as *impossible* for implementing a standard Forth system? And consequently, it should be *impossible* for a standard *program* to implement the standard `s"` word (from the File-Access word set) as an immediate word, for example, as:
: s" ( "ccc" -- sd | )
[char] " parse
state @ if postpone sliteral exit then
dup >r allocate throw tuck r@ move r>
; immediate
(I.e., you think that currently the above definition implements the standard `s"` word, but it should not in a future version of the standard).
-- Ruvim