On Sep 1, 2013, at 1:41 PM, Greg Parker <gpar...@apple.com> wrote:

> 
> You're not entirely left up to their whim. A return value whose declared type 
> is immutable imposes restrictions on both sides:
> 1. You must not mutate the returned object.
> 2. The returned object will not be mutated behind your back by anyone else.

Sadly, the frameworks don't always live up to their end of the bargain on this 
one.

Sometimes their failure to do so is documented—see -[NSTextStorage string], for 
instance. But usually it’s not.

--Kyle Sluder

_______________________________________________

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