On Jan 14, 2013, at 12:49 PM, Charles Srstka <cocoa...@charlessoft.com> wrote:

> On Jan 14, 2013, at 1:23 PM, John McCall <rjmcc...@apple.com> wrote:
> 
>> It is effectively impossible: unlike GC, ARC is not a new runtime 
>> environment.  Different NSTimers may be used from different parts of the 
>> program that are compiled under different settings — most likely, a system 
>> framework compiled under MRR and an executable compiled under ARC.  Indeed, 
>> the *same* NSTimer can be used from different places, which should 
>> presumably agree on how strongly the timer holds its target.
>> 
>> Also, there are quite a lot of existing ARC applications that would 
>> potentially break if we changed the semantics of NSTimer under ARC, so even 
>> if we could implement this, it is really far too late.
> 
> Not impossible at all. All you have to do is add a new API, as for instance 
> NSMapTable did in 10.8. Old code that continues to use the old API continues 
> to get the existing behavior.

It doesn't seem like it would be worth the testing, documentation, and 
cognitive load for a feature so relatively tiny as a timer that references its 
target weakly. I mean, if I were going to get new NSTimer API, I'd rather have 
a method that takes a GCD block and skips the target argument entirely.

Preston
_______________________________________________

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