[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue: HASH-TABLE-GC (no proposal)
- To: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>
- Subject: Re: Issue: HASH-TABLE-GC (no proposal)
- From: masinter.pa@Xerox.COM
- Date: 18 Oct 88 17:17 PDT
- Cc: JonL@lucid.com, CL-Cleanup@SAIL.Stanford.EDU
- In-reply-to: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>'s message of Tue, 18 Oct 88 13:42 EDT
There are two proposals being discussed her:
One proposal is to require "finalization" of some sort: some way to call a
user-written function when an object is "about" to be GC'd. The other,
which is implementable in terms of the first, is just to have hash tables
where entries are deletable when the keys are otherwise GCd.
There are some problems which can be solved by either mechanism, and others
which need one or the other.
I think the hash-table-key-gc problem is compatible with a wide variety of
implementations and GC mechanisms. Since CL makes few requirements on
"garbage collection", this can be viewed as a "declaration" issue... I want
a way to declare that I will never care about keys disappearing when I call
MAPHASH in exchange for the possibility that the pointers can go away.
I think that finalization is difficult for some classes and implementations
of GCs, but still a "good idea".
I think we should write up both of these as "optional" and then decide what
we're going to do with "optional" features. I also don't see it as
necessary for the first draft of the ANSI standard, but perhaps I'm wrong.