improvement request - enabling by-value-containers

bearophile bearophileHUGS at lycos.com
Tue Dec 21 10:18:54 PST 2010


Bruno Medeiros:

> For the love of life, how can anyone think this is a 
> good idea? I'm struggling to find even one use-case where it would make 
> sense. (a non-subjective use-case at least)

I agree that in general collections are better managed by reference. But if you need a hash that you know will not contain more than 10-20 items, and you need max performance, and you don't need to pass it around, than value in-place hash may be useful. I have used it some times. This is not a generic case, but beside the normal collections, Phobos2 may add few little value ones like this.

Bye,
bearophile


More information about the Digitalmars-d mailing list