On May 29, 2016, at 9:54 PM, Quincey Morris <quinceymor...@rivergatesoftware.com> wrote: > > On May 29, 2016, at 19:16 , Daryle Walker <dary...@mac.com > <mailto:dary...@mac.com>> wrote: >> >> Since I am using the substring and not including “.SubstringNotRequired”, I >> can just remove the “guard” block, tack on a “!” to substring’s identifier, >> and be done with it, right? > > The problem is there’s no API contract that says exactly when (and when not) > the string will be nil.
I think the documentation for SubstringNotRequired is sufficient design contract: "NSStringEnumerationSubstringNotRequired "A way to indicate that the block does not need substring, in which case nil will be passed. This is simply a performance shortcut." The strong implication is that when that option is not supplied, nil will not be passed. Certainly, I'd feel betrayed by the docs to discover otherwise. Regards, 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com