Hello Billy,
четверг, 31 января 2002 г., you wrote:
>>e> Forth doesn't have a stack of unparsed words.
>>And pure concatenative approach will. I just don't see any other way
>>to do it.
BT> How can you possibly have a stack of unparsed words? That's a contradiction
BT> in terms. "Unparsed" means that the text hasn't been looked at by the
BT> compiler, so it couldn't have been split into words or placed on a stack.
BT> So what do you mean?
Parsed in the "understood by the system" sense. "Understood" - have an
action binding, etc.
>>Show me what to do with my desire for shorter notation of ALIAS' in
>>pure concatenative way. I'd like to see interpreter internals as well.
BT> You're asking for an applicative notation in a purely concatenative
BT> language. That's literally impossible, by definition. Furthermore, there's
BT> no need for it.
Why?
What if I need to provide a word for simple aliasing for words in
different name spaces? Like
alias-name namespace word-name ALIAS
Or I need to provide a mechanism to update different namespaces, like
namespace word =.= action ;
Or I have to create embedded language? Forth does this with CREATE and
other interesting words.
>>wordnotindictionary1 wordnotindictionary2 ... wordnotindictionaryn
>>wordthatindictionary
>>Here your interpreter ought to have a stack of words that contains
>>wordnotindictionary1..n strings until it found wordthatindictionary.
>>Then it may perform the action. In the PARSE and WORD machinery you
>>use normal operand and return stacks for that, if you need it. Also
>>you may change separator for parsing, as in CHAR " WORD.
BT> OH! Well, I would just error out the moment I hit the first
BT> wordnotindictionary. There's no reason to keep going at that point. It
BT> frankly makes no sense at all to go any further. So why add the notion of a
BT> "parsed word stack"? How could it possibly improve you language to be able
BT> to do things that make no sense?
is-SUPERDUP-in-dictionary == DUP ;
How '==' works?
Best regards,
Serguey Zefirov mailto:
sz@...