Associative arrays give compile error
bearophile
bearophileHUGS at lycos.com
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.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list