> 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
Well, then you would have a lot of null-ptrs when using the by-reference- containers, not very intuitive. What should it be good for?