title: Are Swift "mutable" strings really mutable, or are they just like Java strings?
body: <p>In <em>The Swift Programming Language</em>, in the section on Strings, subsection <em>String Mutability</em>, it says this:</p>
  
  <blockquote>
    <p>You indicate whether a particular <code>String</code> can be modified (or <em>mutated</em>) by assigning it to a variable (in which case it can be modified), or to a constant (in which case it cannot be modified):</p>
  </blockquote>
  
  <p>and gives example code:</p>
  
  <pre><code>var variableString = "Horse"
  variableString += " and carriage"
  // variableString is now "Horse and carriage"
  
  let constantString = "Highlander"
  constantString += " and another Highlander"
  // this reports a compile-time error - a constant string cannot be modified”
  </code></pre>
  
  <p>The book in iBooks <a href="https://itun.es/us/jEUH0.l" rel="noreferrer">here</a>, or in a web browser <a href="https://developer.apple.com/library/prerelease/ios/documentation/swift/conceptual/swift_programming_language/StringsAndCharacters.html#//apple_ref/doc/uid/TP40014097-CH7-XID_368" rel="noreferrer">here</a>.</p>
  
  <p>In the next paragraph it claims that "strings are value types".  </p>
  
  <p>My question: that doesn't look like a mutable string to me. It looks like what I'm used to in Java (or C#, Python, and others): immutable string objects with mutable variable bindings.  In other words, there was an object "Horse" and then it created a new String object "Horse and carriage" and set it to the same variable.  And since there is no way to tell the difference between an reference to an immutable object versus a value type (right?), I wonder: why are they describing it like this?  Is there any difference between these Swift strings and the way it is in Java? (Or C#, Python, Objective-C/NSString)</p>