Re: C++... is it dying?
On Jul 21, 7:59 pm, rpbg...@yahoo.com (Roland Pibinger) wrote:
On Sun, 20 Jul 2008 14:43:06 -0700 (PDT), peter koch wrote:
I just don't see how having STL not being value-
based could be possible in the first place.
Just take a look at the libraries from Rogue Wave or Qt.
Experience with the early Rogue Wave libraries is *why* people
felt that value semantics were so important. (To its credit,
Rogue Wave moved over to supporting value semantics very
quickly, too.)
Secondly, I do not see the real obfuscation. How often do you
need to use e.g. std::vector with anything but the standard
allocator?
The STL allocators literally multiply the length of compiler error
messages.
Which may be indicative that there could be some improvement in
compilers, particularly when it comes to generating error
messages.
Moreover, you don't need user-defined allocators when the
library merely uses value semantics (values and copies of
values). Even if there were a need for allocators they
wouldn't have to be template parameters.
Allocators are a misfeature. IIUC, Stepanov introduced them to
support different pointer models (small, medium, large, etc.).
Why they lived on after this need died, I can't fathom myself.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34