On 6/29/07, Douglas Alan <[EMAIL PROTECTED]> wrote:
> "Chris Mellon" <[EMAIL PROTECTED]> writes:
>
> > You're arguing against explicit resource management with the argument
> > that you don't need to manage resources. Can you not see how
> > ridiculously circular this is?
>
> No.  It is insane to leave files unclosed in Java (unless you know for
> sure that your program is not going to be opening many files) because
> you don't even know that the garbage collector will ever even run, and
> you could easily run out of file descriptors, and hog system
> resources.
>
> On the other hand, in Python, you can be 100% sure that your files
> will be closed in a timely manner without explicitly closing them, as
> long as you are safe in making certain assumptions about how your code
> will be used.  Such assumptions are called "preconditions", which are
> an understood notion in software engineering and by me when I write
> software.
>

Next time theres one of those "software development isn't really
engineering" debates going on I'm sure that we'll be able to settle
the argument by pointing out that relying on *explicitly* unreliable
implementation details is defined as "engineering" by some people.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to