title: Should I prefer to use literal syntax or constructors for creating dictionaries and arrays?
body: <p>I am reading through the iOS Developer Guide to get familiarized with the Objective-C language and currently I am having a little confusion on the topic of Container Literals and Subscript Notation as it pertains to creating objects like <code>NSDictionary</code>.</p>
  
  <p>I understand that there are several ways to create <code>NSDictionary</code> objects including Key-Value encoding (<code>dictionaryWithObjects:forKeys:</code> and <code>dictionaryWithObjectsAndKeys:</code>, or their corresponding initializers). <a href="https://developer.apple.com/library/ios/#referencelibrary/GettingStarted/RoadMapiOS/chapters/AcquireBasicProgrammingSkills/AcquireBasicSkills/AcquireBasicSkills.html" rel="nofollow">Source Link.</a></p>
  
  <p>From my understanding there are two main ways to do this and then there is <strong>another</strong> way which is by using container literals, demonstrated here:</p>
  
  <pre><code>NSDictionary *myDictionary = @{
     @"name" : NSUserName(),
     @"date" : [NSDate date],
     @"processInfo" : [NSProcessInfo processInfo]
  };
  </code></pre>
  
  <p>Which is the best way to use? Is there any benefit in using the Container Literal technique over the previous two or is it just a convenience thing for programmers?</p>
  
  <p>I am under the impression that it is also just another easier way to code things like arrays. Is this true or is there something that I'm missing here? Are these techniques just a matter of personal preference?</p>