Re: disadvantages of using STL
On Mar 18, 1:24 am, Jeff Schwab <j...@schwabcenter.com> wrote:
James Kanze wrote:
On Mar 17, 10:38 pm, Jeff Schwab <j...@schwabcenter.com> wrote:
Pallav singh wrote:
Q What are the disadvantages of using STL ?
Relative to what? The STL is imperfect, but I don't think
I've seen a better library of algorithms and containers.
Better in what way?
What is this, a Zen koan?
Socratic reasoning:-).
Every question met with a question? Better in the sense that
it's faster, more generic, and easier to use.
Faster and easier to use? It ranks close to last among the
libraries I've used in that respect. More generic, perhaps,
although not always. On the other hand, it's far more complete
than any other library I've used, and it's generally more
orthogonal than most.
Most importantly, of course, it's standard. So you don't
(usually) have to think about it.
When I used the word, I was thinking of the old, intrusive
containers used with MFC, and of the Java collections
framework.
I've never used MFC, but I find the Java collections easier to
use than the STL (although they also have some problems);
they're also more generic, at least in some ways. (Arguably,
the earliest versions were too generic. You could put a Toto
into a collection, and try to get a Titi out, only getting an
error at runtime. From what I understand, this defect has been
fixed, but I've not had the occasion to use Java since then.)
--
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