Re: "No options" constant
Re: "No options" constant
- Subject: Re: "No options" constant
- From: Sixten Otto <email@hidden>
- Date: Thu, 17 Oct 2013 17:05:48 -0700
On Thu, Oct 17, 2013 at 3:15 PM, Quincey Morris <
email@hidden> wrote:
> Yeah. It seems to me there are two prime reasons to use a specific
> constant:
>
But I'm explicitly talking about APIs where there exists no such constant,
and calling code would generally use a literal zero. If Apple wants to
provide a new NSStringCompareOptions value (for example) that's equal to
zero, and meaning "none of these," that would be fantastic, and I'd use it.
But today, there is no such thing.
Let me be clear: I'm not talking about borrowing the "none" constant from
Enumeration A and using it when calling something that expects values from
Enumeration B. I agree that that would be confusing, and possibly get me
into trouble one day. The thing that I was trying to remember, and that
apparently no one recognizes from my description, was a standalone thing.
More like NULL or NO.
_______________________________________________
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