Literal declaration has been supported since xcode 4.4 (actually because of compiler support, xcode 4.4 upgraded the compiler to LLVM4.0). Refer to Apple’s release note:
New Features in Xcode 4.4
Usage summary reference: Objective-C literals for NSDictionary, NSArray, and NSNumber
Syntactic sugar, also translated as sugar-coated syntax, is a term invented by British computer scientist Peter J. Landin, which refers to a certain kind of syntax added to computer languages. This kind of sugar Syntax has no impact on the functionality of the language, but it is more convenient for programmers to use. Generally speaking, using syntax sugar can increase the readability of the program, thereby reducing the chance of program code errors.
In addition, there is syntax sugar for array and dictionary reading and writing
NSObject * obj = array[index];
NSObject * value = dict[key];
Literal declaration has been supported since xcode 4.4 (actually because of compiler support, xcode 4.4 upgraded the compiler to LLVM4.0). Refer to Apple’s release note:
New Features in Xcode 4.4
Usage summary reference: Objective-C literals for NSDictionary, NSArray, and NSNumber
In addition, there is syntax sugar for array and dictionary reading and writing