Why don't people like lisp?
rainerd at eldwood.com
Fri Oct 24 20:09:55 CEST 2003
Jon S. Anthony wrote:
> "Rainer Deyke" <rainerd at eldwood.com> writes:
>> I'm all for more elaborate gc schemes. In particular, I want one
>> that gives me guaranteed immediate destructors even in the presence
>> of reference cycles. And I want to language specification to
>> guarantee it.
> It's difficult to even put a requirement for "gc" in a language
> _specification_ let alone one that _guarantees_ this sort of thing.
>> Having to explicitly close files is something I'd expect in C or
>> assembly, but it has no place in high-level languages. And
>> "with-open-file" is too limiting. Let the computer do the work, not
>> the programmer.
> What's limiting about it?
Unless I've completely misunderstood the concept, "with-open-file" requires
me to structure my program such that the file is opened at the beginning and
closed at the end of a block of code. In the absence of coroutines or
threads (both of which would significantly complicate the structure of my
code), this implies that the lifetime of open files is strictly
hierarchical: if file 'a' is opened while file 'b' is open, then file 'b'
must be closed before file 'a' is closed. More generally, it implies that
the file is opened at the beginning of a natural code block (instead of, for
example, on first use) and is closed at the end of the same block (instead
of, for example, when it is no longer needed).
Rainer Deyke - rainerd at eldwood.com - http://eldwood.com
More information about the Python-list