Sujet : Re: single-xt approach in the standard
De : mhx (at) *nospam* iae.nl (mhx)
Groupes : comp.lang.forthDate : 17. Sep 2024, 13:15:27
Autres entêtes
Organisation : novaBBS
Message-ID : <1a3ebf77c1ed8926d455a268e1309fe0@www.novabbs.com>
References : 1
User-Agent : Rocksolid Light
On Tue, 17 Sep 2024 10:54:37 +0000, 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.
First define exactly the [new things] that can be done with an xt or an
nt.
What some of my customers tried is, by using standard words, associate
generated code sequences with an xt (nearly impossible), or infer an nt
from an xt (which is not 1-to-n [n>=3], and asymmetrical).
A limited/qualified guarantee for the nt-xt relationship can be useful.
Example: DEFER aa ' DROP IS aa allows to recover the nt "DROP" from
aa's DEFER@ and it is possible to disassemble linked lists of nt's.
-marcel