While reading this blog the writer says that
NSArray *array = @[ @"one", @"two" ];
if the above array is a global variable, then it errors out. The reason is
This is because the @[] syntax literally translates into a call to an NSArray method. The compiler can't compute the result of that method at compile time, so it's not a legal initializer in this context.
My question is how can the same declaration inside a method is valid?