Why don't people like lisp?

Paul Rubin http
Thu Oct 23 13:41:40 EDT 2003


Brian Kelley <bkelley at wi.mit.edu> writes:
> The file is closed when the reference count goes to zero, in this case
> when it goes out of scope.  This has nothing to do with the garbage
> collector, just the reference counter.

There is nothing in the Python spec that says that.  One particular
implementation (CPython) happens to work that way, but another one
(Jython) doesn't.  A Lisp-based implementation might not either.

> At least, that's the way I
> understand, and I have been wrong before(tm).  The upshot is that it
> has worked in my experience 100% of the time and my code is structured
> to use (abuse?) this.  How is this more difficult?

Abuse is the correct term.  If your code is relying on stuff being
gc'd as soon as it goes out of scope, it's depending on CPython
implementation details that are over and above what's spelled out in
the Python spec.  If you run your code in Jython, it will fail.




More information about the Python-list mailing list