improvement request - enabling by-value-containers

KennyTM~ kennytm at gmail.com
Wed Dec 15 10:24:57 PST 2010


On Dec 15, 10 14:23, bearophile wrote:
> 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

std.typecons.Unqiue ?


More information about the Digitalmars-d mailing list