|
I'm glad to see these additions, but the syntax for an NSArray literal bugs me. When I want an array literal in C, I'd write ... int foo[] = { 1, 2, 3, 4, 5};
... but in Objective-C, for an NSArray literal I'd write ... NSArray *bar = @[o1, o2, o3];
Why did they choose '[' over '{'? Oddly enough, NSDictionary uses '{'.I feel like the syntax for an NSString literal is more natural (as a C developer). NSString *baz = @"look, an NSString literal";
char szBaz[] = "look, a C string literal";
|