Re: "No options" constant

2014-03-14 Thread Sixten Otto
On Thu, Oct 17, 2013 at 5:05 PM, Sixten Otto wrote: > 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 on

Re: "No options" constant

2013-10-17 Thread Sixten Otto
On Thu, Oct 17, 2013 at 3:15 PM, Quincey Morris < quinceymor...@rivergatesoftware.com> 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 litera

Re: "No options" constant

2013-10-17 Thread Quincey Morris
On Oct 17, 2013, at 14:35 , Seth Willits wrote: > It's too easy in my mind to misuse a "universal" constant. Yeah. It seems to me there are two prime reasons to use a specific constant: 1. Apple's SDKs are gradually moving towards using enums that can be (somewhat) type-checked at compile time

Re: "No options" constant

2013-10-17 Thread Seth Willits
On Oct 17, 2013, at 11:55 AM, Sixten Otto wrote: > On Thu, Oct 17, 2013 at 11:22 AM, Seth Willits wrote: >> I would be hesitant to get used to such a constant. > > I'll bite: why? As each API is potentially different from others, it's best to use the constants provided. Using a constant from a

Re: "No options" constant

2013-10-17 Thread Sixten Otto
On Thu, Oct 17, 2013 at 11:22 AM, Seth Willits wrote: > I would be hesitant to get used to such a constant. > I'll bite: why? > Many APIs have their own constants for default options. (Search for > DefaultOptions, OptionsDefault, NoOptions, and OptionsNone.) > Obviously. And those generally s

Re: "No options" constant

2013-10-17 Thread Seth Willits
On Oct 17, 2013, at 10:48 AM, Sixten Otto wrote: > I remember coming across a reference somewhere recently to a constant > defined in Foundation or Core Foundations (I think!) that has a zero value, > and semantically means "I choose no options". I know of no constant that would apply universall

Re: "No options" constant

2013-10-17 Thread T.J. Usiyan
I am not sure that there is a catch-all 'no options' constant. I did find framework specific examples like kCFDateFormatterNoStyle, kCFNumberFormatterNoStyle, kCollectionDontWantTag, kCollectionDontWantId, kCollectionDontWantSize, kCollectionDontWantAttributes, kCollectionDon

"No options" constant

2013-10-17 Thread Sixten Otto
This has been driving me crazy, and hopefully someone on the list will know off the top… I remember coming across a reference somewhere recently to a constant defined in Foundation or Core Foundations (I think!) that has a zero value, and semantically means "I choose no options". Something that wo