title: Conceptual questions about Struct's immutability and property changes from within the struct and from the instance
body: <pre><code>struct Test {
      var a: Int
      
      func changeA() {
          a = 10
      }
  }
  
  var testInstance = Test(a: 10)
  testInstance.a = 1
  </code></pre>
  <ol>
  <li><p>I understand, Structs are immutable, nonetheless the Swift compiler allows me to change Property &quot;a&quot; to 1, after it was already initialized to 10, were Structs immutable? why this is allowed?</p>
  </li>
  <li><p>If the Swift compiler allows to change property &quot;a&quot; from the instance, why it doesn't allow to have the method &quot;changeA&quot; to modify &quot;a&quot; from within the Struct without adding the &quot;mutating&quot; modifier? It seems it is allowed to modify the property from the instance, but not from a method within the Struct, why?</p>
  </li>
  <li><p>These are more conceptual questions, I fully understand that I can add &quot;mutating&quot; in front of the method and it will compile, but why I have to do that, if by default I am allowed to modify the property from outside the method after initialization, why the extra level of rigor with &quot;mutating&quot; to modify a property, that it is already declared as &quot;var&quot;?</p>
  </li>
  </ol>
  <p>I am very much interested in the theory and concepts behind Struct's immutability.</p>