Adding nil to the end is not intended to add nils to an array, it is just an artifact of how C handles ... variable arguments. It has nothing to do with NSArray or NSMutableArray, you also cannot store null.
So, regardless of whether the compiler accepts, nil, nil, nil does not actually matter. The compiler will stop reading from the first zero. And writing this code primarily shows a misunderstanding of obj C collections and var arg methods.
Why not use the new literal syntax and just say
NSArray *myArray = @[@"bla", @"bla", @"bla"];
In any case, extra nil does not matter in the syntax you provide.
source share