[gclist] Finalization and the insane postman bug.

Charles Fiterman cef@geodesic.com
Thu, 11 Oct 2001 08:58:37 -0500

We have anther unsaid division. What should the collector do? What should
the low level language system (byte code etc.) do? What should the high
level system (accounting objects for dentists) do?

Since this is a collector group we've been concentrating on what should the
collector do. I'm fairly convinced it should offer death and near death
notices but never finalizers. It can't. The collector can tell you what
died and what is kept from death only by your request for custody. Running
user code can't be the collector's job.

I think the low level system should do the same. I also think it should
offer reflexivity.

On top of this various finalizer objects such as files that close when not
in use can be built. These have their own requirments for safe, sure,
prompt and ordered. If you have finalizers that must be run at end of job,
even when a program throws a fatal exception put them on a list visable to
the outer catch statement and do them there. It can't be the collector's
job to run code for a crashed program. That way lies madness.