Digest #248 2024-01-01
Contributions
Maybe I'm missing something obvious, but how is this an extension of CORE FIND? It seems like exactly the same wording.
Replies
I forgot to write the conclusion of the statement about the intent: Forth-2012 says: "Execute xt once for every word in the wordlist wid", but does not say whether "every word" includes shadowed words or not. This is compatible with the intent that the system implementor can do either. However, it probably is a good idea to make this intent more explicit.
Yes, shadowing does not invalidate existing nts and xts. You can even get at the name with NAME>STRING.
Amusingly, I've tried this in gforth:
: q quit ; immediate
: dd BEGIN q ;
.s
… and surely enough, there's the naked control stack for all to see. As a consequence of the fact that QUIT
doesn't clear the control stack (or the data stack, as per the spec).