Re: disadvantages of using STL
On Mar 18, 12:30 am, Victor Bazarov <v.Abaza...@comAcast.net> wrote:
James Kanze wrote:
On Mar 17, 9:31 pm, Pallav singh <singh.pal...@gmail.com> wrote:
Q What are the disadvantages of using STL ?
Compared to what?
I thought it was "compared to *not* using it"... <g> I mean,
what is the alternative of "using"?
Yes, but... Not using it how? If the alternative being
considered is not using any containers, or any algorithms... if
you can easily do that, then the STL is just so much extra
baggage (as is any other container library you can think of).
If the alternative being considered is to implementing your own
libraries, the STL has distinct disadvantages when it comes to
job security (if you role your own, it will take a lot longer to
implement the application, and if you do it cleverly enough,
you'll be the only person who can maintain the code), but I
can't think of any others. If you're comparing it to the Java
collections, of course, the STL has some very distinct
disadvantages if you're programming in Java (it doesn't work in
Java), but just the reverse is true (for the same reason) if
you're programming in C++. If you're comparing it to OSE, it's
not as cleanly designed or as easy to use, but it's more
complete, and above all, it's standard, so new programmers on
the project can be expected to already be familiar with it.
And so on. Depending on the alternative you are considering,
the disadvantages will vary. In all be exceptional cases,
however, they won't be enough to outweigh the advantage of it
being standard.
--
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