On Sep 26, 2017, at 08:19 , Jens Alfke <j...@mooseyard.com> wrote: > > You’re assuming it’s a synthesized getter, but there’s no reason it couldn’t > be a custom method that does arbitrary computation before returning the > value, and there’s no way to know whether that work is thread-safe or not.
It is, in a sense, “even worse” than that. Even with a synthesized getter, you might get a bad value, if it’s a non-synthesized, non-trivial setter. For example, it’s possible to pass an arbitrary number to the NSButton.state setter, but the getter is supposed to return one of three values (on, off, mixed). If the setter stores the input value transiently, before replacing it with the legal equivalent, that could lead to a failure in using the getter. _______________________________________________ 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