Re: NSFileWrapper - is this really so bad?

2015-10-28 Thread Nivek Research
Perhaps just a little too OCD; however, if one is sending a message like count to a large number of containers using nil (Null) can be considerably more efficient then passing an empty shared instance. The Objective-C pattern when sending a message to a nil object pointer avoids the overhead of

Re: NSFileWrapper - is this really so bad?

2015-10-27 Thread Rick Mann
> On Oct 27, 2015, at 16:24 , Graham Cox wrote: > > In XCode 7, I’m getting a new warning when compiling some code that uses > NSFileWrapper, due to the addition of the NON_NULL qualifier: > > Null passed to a callee that requires a non-null argument > > The code is:

Re: NSFileWrapper - is this really so bad?

2015-10-27 Thread Graham Cox
> On 28 Oct 2015, at 10:24 AM, Graham Cox wrote: > > due to the addition of the NON_NULL qualifier Actually, I should amend that: it doesn’t have ANY qualifier, so that appears by default to mean that it’s NOT nullable. I’m still getting used to this additional

Re: NSFileWrapper - is this really so bad?

2015-10-27 Thread Quincey Morris
On Oct 27, 2015, at 16:24 , Graham Cox wrote: > > NSFileWrapper* fw = [[NSFileWrapper alloc] > initDirectoryWithFileWrappers:nil]; //<— Null passed to a callee > that requires a non-null argument It’s not necessarily so much about null vs non-null. A

Re: NSFileWrapper - is this really so bad?

2015-10-27 Thread Greg Parker
> On Oct 27, 2015, at 4:24 PM, Graham Cox wrote: > > In XCode 7, I’m getting a new warning when compiling some code that uses > NSFileWrapper, due to the addition of the NON_NULL qualifier: > > Null passed to a callee that requires a non-null argument > > The code is:

Re: NSFileWrapper - is this really so bad?

2015-10-27 Thread Graham Cox
> On 28 Oct 2015, at 10:53 AM, Alex Kac wrote: > > Have you tried simply passing in a blank dictionary? Is that OK? Yes, that works OK. It’s at least a simple way to shut the warning up, though strikes me as unnecessary and inefficient, FWIW. —G.

Re: NSFileWrapper - is this really so bad?

2015-10-27 Thread Charles Srstka
> On Oct 27, 2015, at 7:08 PM, Graham Cox wrote: > >> On 28 Oct 2015, at 10:53 AM, Alex Kac > > wrote: >> >> Have you tried simply passing in a blank dictionary? Is that OK? > > > Yes, that works OK. It’s at

NSFileWrapper - is this really so bad?

2015-10-27 Thread Graham Cox
In XCode 7, I’m getting a new warning when compiling some code that uses NSFileWrapper, due to the addition of the NON_NULL qualifier: Null passed to a callee that requires a non-null argument The code is: NSFileWrapper* fw = [[NSFileWrapper alloc] initDirectoryWithFileWrappers:nil];