title: Is there anything like a struct in dart?
body: <p>In javascript it always bothered me people use objects as vectors like <code>{x: 1, y: 2}</code> instead of using an array <code>[1,2]</code>. Access time for the array is much faster than the object but accessing by index is more confusing especially if you need a large array. I know dart has fixed arrays but is there a way to name the offsets of an array like you would a struct or a tuple/record in another language? Define enum/constants maybe? </p>
  
  <p>I'd want something like</p>
  
  <pre><code>List&lt;int&gt; myVector = new List([x,y]);
  myVector.x = 5;
  </code></pre>
  
  <p>is there an equivalent or idiomatic way to do this?</p>