On Aug 27, 2008, at 5:59 PM, R.L. Grigg wrote:

Hmm, I guess the wrinkle in this particular case is if the "contract" doesnt specify something that the programmer assumes to be safe to do (like enumerating backwards), how can you know how to implement your end?

Enumerating NSArrays backwards is safe and supported by the framework. The earlier discussion had to do with mutating a collection while enumerating, which is explicitly stated to be unsafe. Somebody (I forget who) claimed that mutating was "safe" while enumerating backwards, but they were wrong. In this case, their wrongness was not based on things left unsaid in the contract, but on violating things explicitly laid out in the contract.

Cheers,
Ken
_______________________________________________

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

This email sent to [EMAIL PROTECTED]

Reply via email to