Why don't people like lisp?

Raymond Wiker Raymond.Wiker at fast.no
Fri Oct 24 03:39:42 EDT 2003


"Rainer Deyke" <rainerd at eldwood.com> writes:

> Jon S. Anthony wrote:
>> Brian Kelley <bkelley at wi.mit.edu> writes:
>>> Now the usage is:
>>>
>>> f = SafeFileWrapper(open(...))
>>> print >> f, "A couple of lines"
>>> f.close()
>> ...
>>> I still have to explicitly close the file though when I am done with
>>
>> It's just this sort of monotonous (yet important) book keeping (along
>> with all the exception protection, etc.) that something like
>> with-open-file ensures for you.
>
> Personally I'd prefer guaranteed immediate destructors over with-open-file.
> More flexibility, less syntax, and it matches what the CPython
> implementation already does.

        Right... all along until CPython introduces a more elaborate
gc scheme. 

        Note that reference-counting has problems with cyclic
references; probably not something that will bite you in the case of
open files, but definitely a problem you need to be aware of.

-- 
Raymond Wiker                        Mail:  Raymond.Wiker at fast.no
Senior Software Engineer             Web:   http://www.fast.no/
Fast Search & Transfer ASA           Phone: +47 23 01 11 60
P.O. Box 1677 Vika                   Fax:   +47 35 54 87 99
NO-0120 Oslo, NORWAY                 Mob:   +47 48 01 11 60

Try FAST Search: http://alltheweb.com/




More information about the Python-list mailing list