• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: When can String.enumerateSubstringsInRange ever pass in NIL?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When can String.enumerateSubstringsInRange ever pass in NIL?


  • Subject: Re: When can String.enumerateSubstringsInRange ever pass in NIL?
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 30 May 2016 02:42:01 -0700
  • Feedback-id: 167118m:167118agrif8a:167118shxMuJh5vW:SMTPCORP

On May 29, 2016, at 22:31 , Ken Thomases <email@hidden> wrote:
>
> 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."

This contract is of the form “if A then B”, from which it is NOT generally valid to conclude “if not-A then not-B”. Plausibly, you can read a hidden “only” into the documentation, but I’d still suggest not relying on it, since it seems unnecessary.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


References: 
 >When can String.enumerateSubstringsInRange ever pass in NIL? (From: Daryle Walker <email@hidden>)
 >Re: When can String.enumerateSubstringsInRange ever pass in NIL? (From: Ken Thomases <email@hidden>)
 >Re: When can String.enumerateSubstringsInRange ever pass in NIL? (From: Daryle Walker <email@hidden>)
 >Re: When can String.enumerateSubstringsInRange ever pass in NIL? (From: Quincey Morris <email@hidden>)
 >Re: When can String.enumerateSubstringsInRange ever pass in NIL? (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: debugging AirDrop (update)
  • Next by Date: QLPreviewPanel (how to supply default application url?)
  • Previous by thread: Re: When can String.enumerateSubstringsInRange ever pass in NIL?
  • Next by thread: Simplest way to generate audio tones?
  • Index(es):
    • Date
    • Thread