Re: Constant array



Alex McDonald wrote:
On Jan 26, 8:24 pm, Elizabeth D Rather <erat...@xxxxxxxxx> wrote:
Alex McDonald wrote:
On Jan 26, 5:01 pm, Bernd Paysan <bernd.pay...@xxxxxx> wrote:
....
A lot of things in Forth *can* be inspected. You can write a FORGET that is
extensible (by just providing a hook into FORGET), and you can inspect
quite a lot of things when you use FORGET. E.g. if you fear that a deferred
word is corrupted by FORGET, you hook an extension into your FORGET that
looks for all deferred words, and checks if the words linked there are
inside the range of forgotten words - if so, "fix" them (at least to
something that crashes reliable with a meaningful error message). Note that
ANS Forth might lack the tools for inspecting itself, but usually Forth
systems have such tools.
But at the point where FORGET is executed you can't inspect something
of which you now have no knowledge.
You're actually recommending that if a FORGET is removing several
hundred words from the dictionary that all DEFERs and other vectors be
matched against the xt's of all the words to be discarded? And somehow
you'll know what to reset them to if necessary? Not too likely!

No; are you responding to the right message? I'm suggesting we FORGET
FORGET.

Right, I was responding to the paragraph beginning "A lot of things in Forth *can* be inspected."

The problem is that there's a lot of history involved: not only what
definitions were added to the dictionary since a word was defined, but
DEFERs and other vectors, interrupt vectors, addresses stored here and
there, changes to memory allocations in various memory spaces, etc.
It's preposterous (wildly bulky & inefficient) to record all this state
information with every single definition, which is what what would be
required to make plain old FORGET workable in a modern Forth. It is
really simple, however, to have MARKER record whatever state information
needs to be remembered, so that it can be restored easily.


Agreed. I can't see a disgreement between your position and mine. To
the extent that my Forth has the equivalent of;

: forget ( -<name>- )
true abort" FORGET no longer works. Use MARKER or ANEW" ;
immediate

Yes, we agree. It appears that it's folks with nostalgia for 80's Forths who are clinging to FORGET. I see no technical need to preserve it.

Cheers,
Elizabeth

--
==================================================
Elizabeth D. Rather (US & Canada) 800-55-FORTH
FORTH Inc. +1 310.999.6784
5959 West Century Blvd. Suite 700
Los Angeles, CA 90045
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================
.



Relevant Pages

  • Re: Cinnamon and the phone
    ... I guess I'm lucky Cinnamon can't get the phone off the hook. ... see my cats at ... read Sam's blog at http://kittens-3.blogspot.com/ ... that's just my cat listening in on the extension." ...
    (rec.pets.cats.anecdotes)
  • circuit that watches for phone ring and resets external device
    ... I'm looking for either a circuit, kit or prebuilt device that will hook ... up to a phone line and when I dial that extension it will reset my DSL ...
    (sci.electronics.design)
  • Re: Anybody try the new 2007 ezzys?
    ... I think I have one Chinook hook and a couple more by ... break an extension last week, but haven't had any problems with the ... it takes seconds to attach/detach the downhaul. ...
    (rec.windsurfing)
  • Re: Anybody try the new 2007 ezzys?
    ... The Chinook downhaul hooks are weaker than the ... I think I have one Chinook hook and a couple more by ... break an extension last week, but haven't had any problems with the ...
    (rec.windsurfing)

Loading