[gclist] Finalization and OO.

Charles Fiterman cef@geodesic.com
Fri, 28 Mar 1997 09:33:50 -0600

> Hmm... OO (and dynamic languages in general) seems to
> have flourished for many years without finalization or
> weak references.

I hate to beat a dead horse but consider.

One of my favorite class libraries is multi-precision integers.
The class I use draws the line at 64K which has never been a
problem for me. But for some users than 64K limit on integer
length is a serious drawback. Suppose they came out with an
improved version which used file overflow for integers over
16K in length and allowed integers to fill your disk if need be.

Now the finalizer for an integer might need to close a file,
probably a virtual file. And to know if I needed to close that
file I would need ugly details about the implementation that
I really don't want to know. I would have to track the last
use of every large integer. And this need would come up suddenly
with the release change.

Oh horrible horrible horrible. The only excuse is if there
was really no way around it. But there is a way around it,
and it isn't even that bad.
Charles Fiterman		Geodesic Systems
414 North Orleans Suite 410	Phone 312 832 1221 x223
Chicago IL 60610-4418		FAX   312 832 1230

A computer language without garbage collection
  is like a city without garbage collection.