There are many techniques for doing this, for example, via internal pointers to underlying representations that are shared whenever the support procedures determine that this is possible. They were later removed. Programmers themselves are in a much better position to know when to make copies and when to use references. Hiding these matters often leads to less efficient and predictable behavior, especially for classes like String s. In many others, explicit use by programmers of pointers to shared String s only when desirable and possible is more effective than any automated policy.
Similar remarks hold for assignment and other operations.
Such decisions reflect the idea that a basic support library should provide mechanism not policy . The MPlex class helps manage sparse tables. Other classes provide mechanisms useful for very special allocation needs.