title: ColdFusion structs Direct Assignment vs object literal notation
body: <p>The newer versions of ColdFusion (I believe CF 8 and 9) allow you to create structs with object literal notation similar to JSON.</p>
  
  <p>My question is, are there specific benefits (execution efficiency maybe) to using object literal notation over individual assignments for data that is essentially static?</p>
  
  <p>For example:</p>
  
  <p>With individual assignments you would do something like this:</p>
  
  <pre><code>var user = {};
  user.Fname = "MyFirstnam";
  user.Lname = "MyLastName";
  user.titles = [];
  ArrayAppend(user.titles,'Mr');
  ArrayAppend(user.titles,'Dr.');
  </code></pre>
  
  <p>Whereas with object literals you would do something like.</p>
  
  <pre><code>var user = {Fname = "MyFirstnam",
              Lname = "MyLastName",
              titles = ['Mr','Dr']};
  </code></pre>
  
  <p>Now this limited example is admittedly simple, but if titles was an array of structures (Say an array of addresses), the literal notation becomes awkward to work with.</p>