
loufoque wrote:
Hervé Brönnimann wrote:
A shared string would be *extremely* useful. Most of the projects I'm working on these days spend a non-negligible time copying strings... FWIW, HB
Libraries that produce needless copies are simply ill-designed, The obvious case is return by value. I know that there are some compiler optimizations that can help here, but we have to work with the compilers we have.
The other case is standard containers (and yes, I know I snipped your comment that the standard library is badly designed). Until we have a C++09 compiler that supports move, maps etc involve a lot of copying.
- Sharing, if used, works way better with immutable objects. Well yes. I don't know about Hervé, but I would have thought a shared string class would indeed be immutable
-- Martin Bonner Project Leader PI SHURLOK LTD Telephone: +44 1223 441434 / 203894 (direct) Fax: +44 1223 203999 Email: martin.bonner@pi-shurlok.com www.pi-shurlok.com disclaimer