title: What's the rationale for preventing assignment to arrays?
body: <p>I've tried to google this and have read:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/14826952/why-cant-arrays-of-same-type-and-size-be-assigned">Why can't arrays of same type and size be assigned?</a></li>
  <li><a href="https://stackoverflow.com/questions/7882735/assigning-arrays">Assigning arrays</a></li>
  <li><a href="https://stackoverflow.com/questions/21293491/assign-to-array-in-struct-in-c">Assign to array in struct in c</a></li>
  </ul>
  
  <p>But they all state the obvious: you can't assign to arrays because the standard says so. That's great and all, but I want to know <em>why</em> the standard doesn't include support for assigning to arrays. The standard committee discusses things in detail, and I'd be surprised if they never discussed making arrays assignable. Assuming they've discussed it, they must have some rationale for not letting arrays be assigned to.</p>
  
  <p>I mean, we can put an array in a struct and assign to the struct just fine:</p>
  
  <pre><code>struct wrapper
  {
      int array[2];
  };
  
  struct wrapper a = {{1, 2}};
  struct wrapper b = {{3, 4}};
  a = b; // legal
  </code></pre>
  
  <p>But using an array directly is prohibited, even though it accomplishes effectively the same thing:</p>
  
  <pre><code>int a[2] = {1, 2};
  int b[2] = {3, 4};
  a = b; // Not legal
  </code></pre>
  
  <p>What is the standard committee's rationale for prohibiting assigning to arrays?</p>