Re: Could somebody please fix NSTimer?
Re: Could somebody please fix NSTimer?
- Subject: Re: Could somebody please fix NSTimer?
- From: Quincey Morris <email@hidden>
- Date: Mon, 14 Jan 2013 13:25:05 -0800
On Jan 14, 2013, at 12:38 , Kyle Sluder <email@hidden> wrote:
> Given that Gordon's explicit use case involves one part of his app
> setting up timers that point at objects in other parts of his app that
> know nothing of the timers' existence, this sounds like a fragility
> nightmare.
>
> The NSTimer ship has sailed.
Two side issues relevant to that same ship:
First, if we read tea leaves, it's significant that NSTimer hasn't acquired any blocks-based API extensions. I take that as a signal that NSTimer is doomed eventually, and the alternative will be either GCD timers or a new Cocoa wrapper around GCD timers. Of course, it may just be a signal that Apple hasn't gotten to blocks-enhancing NSTimer yet, or has decided it doesn't need it.
Second, as an example of adding API to an old class, consider the block-based addition to NSNotificationCenter. Although it does provide a convenient block-based alternative, and solves the very old problem of uniquely identifying the particular observation request so that it can be unambiguously removed later, the rules for proper memory management under the various memory models are byzantine. Not a huge success IMO.
_______________________________________________
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