Re: GC pros and cons
Re: GC pros and cons
- Subject: Re: GC pros and cons
- From: Kyle Sluder <email@hidden>
- Date: Thu, 25 Jun 2009 12:11:51 -0700
On Thu, Jun 25, 2009 at 11:39 AM, Peter Ammon<email@hidden> wrote:
> Are you saying that it's not sloppy to close a file twice, unlock a lock
> twice, etc.?
It sounds to me like you were originally referring to language
implementation sloppiness, which has nothing to do with closing a file
twice, unlocking locks multiple times, etc. (client sloppiness).
> Python doesn't require that its contexts be robust against multiple calls to
> __exit__ (its answer to Dispose()).
Now we're back to implementation sloppiness. I see no guarantee that
__exit__ will only be called once. Python users don't typically call
__enter__ and __exit__ explicitly; .NET users often call Dispose()
explicitly, because it is useful in situations other than inside using
blocks.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden