improvement request - enabling by-value-containers
bearophile
bearophileHUGS at lycos.com
Tue Dec 14 22:23:09 PST 2010
Michel Fortin:
> I have to echo a similar concern with by-reference containers from my
> experience of Cocoa. It's really too easy to have two references to the
> same container without realizing it.
A partial (but maybe better) solution to this problem is to introduce "linear types" in D, ad then let the compiler allocate a container on the stack as an automatic optimization where possible:
http://en.wikipedia.org/wiki/Linear_types
Bye,
bearophile
More information about the Digitalmars-d
mailing list