Quincey, Checking version of the OS is the least problem. Providing an implementation is the actual one. I want to use weaks, because they are easier for developers who are tought by new documentation and didn't learn to explicitly nullify references to objects like delegate. Not saying that one would want to this logic in an app that targets newer versions of OS X.
> On 21 февр. 2016 г., at 11:50, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Feb 20, 2016, at 21:03 , Ilya Kulakov <kulakov.i...@gmail.com > <mailto:kulakov.i...@gmail.com>> wrote: >> >> There should be an ability to makes this decision in runtime I guess. > > Well, there is, if you mean that you make the decision — -[NSProcessInfo > isOperatingSystemAtLeastVersion:]. > > I’m not sure I understand, though, why you want to have this decision made. > If you wrote code to make ‘assign’ (aka ‘unowned’) work in 10.6, that code — > manual zeroing of the reference, I mean — will necessarily work in later > versions, so why not just go with that unconditionally? > > OTOH, if you have a good reason for wanting to use ‘weak’ instead, it seems > to me that’s a good reason to withdraw support for 10.6**, or at least to > have a separate build for clients that want to run on 10.6. > > > ** I’m not sure I remember now, but didn’t 10.6.8 have support for zeroing > weak references? If that’s so, you could just withdraw support for 10.6.7 or > earlier, which shouldn't upset anyone greatly. > _______________________________________________ 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