paul at prescod.net
Tue Jun 1 07:43:18 CEST 1999
Yukihiro Matsumoto wrote:
> >As many people have noted before, you would not be able to use
> >destructors to free up resources like memory or file descriptors.
> which, as I understand, means destructors can not be used with real
> GC. That's just not true.
Is there a language with real GC where destructors are called as
predictably as they are in Python?
> |But I think that the bigger problem with "real GC" is that C programs
> |often hang on to references to Python objects and any kind of compacting
> |GC would invalidate those references.
> It's the common legend especially here in comp.lang.python.
> >From my experience with Scheme and Ruby, both with real GC, the real
> GC is mostly very fast.
Speed wasn't my concern. I asked about references in C code. Do we use
PyObject **s instead of PyObject *s now?
> |But note that Python's guarantees are more important in small, simple
> |programs and Java's guarantees are better for large, complex programs with
> |complicated data structures.
> Do you really mean Python the object-oriented programming language
> rarely treat complicated data structures?
No, I said that Python is optimized for basic users, not for the experts.
The experts can figure out how to work around problems. The beginning
users cannot. "I'm opening all of the files in a directory in a loop and
in large directories I get out of file handle errors."
Paul Prescod - ISOGEN Consulting Engineer speaking for only himself
"Silence," wrote Melville, "is the only Voice of God." The assertion,
like its subject, cuts both ways, negating and affirming, implying both
absence and presence, offering us a choice; it's a line that the Society
of American Atheists could put on its letterhead and the Society of
Friends could silently endorse while waiting to be moved by the spirit
to speak. - Listening for Silence by Mark Slouka, Apr. 1999, Harper's
More information about the Python-list