The modern Objective-C literal syntax should be preferred because it is clearer and easier to read. More importantly, it is easier to use correctly than the original, boxed syntax.


== Noncompliant Code Example

----
NSNumber *twelve = [NSNumber numberWithInt:(11 + 1)];  // Noncompliant
NSArray *arr = [NSArray arrayWithObjects:@1, @2, @3, nil];  // Noncompliant
----


== Compliant Solution

----
NSNumber *twelve = @(11 + 1);
NSArray *arr = @[ @1, @2, @3 ];
----


