On Jan 14, 2013, at 12:38 , Kyle Sluder <k...@ksluder.com> 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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to