Associative arrays give compile error

bearophile bearophileHUGS at
Wed Oct 6 05:12:28 PDT 2010

Steven Schveighoffer:

> Casting to immutable is the only way to create such a beast.

Then maybe we have to improve the language semantics to allow a better solution. See the Transients of Clojure or the larval objects of Java :-)

The compiler may need to test (at compile time) that there's only one reference to the AA and its contents, and turn it into immutable.


More information about the Digitalmars-d-learn mailing list