With the new template feature, I can now write code like this:
NSArray<NSString*>* a = [NSArray arrayWithObjects:@1, [NSDate date], nil];
NSLog(@"%@", a);
Now the question for me is that it seems the <template> syntax is only about annotation. The compiler does not even issue a warning about the above code; neither does the runtime crash on the NSLog line. That's quite confusing.
I could not find this new syntax in the official "Programming With Objective-C" book. Can someone direct me to some useful resources? Thanks.