Re: Replacement for MS STL?
Hi Garry,
It will be quite an arrogance to defend Dinkum's C++ Library
after the author himself put his weight already. Anyway, see
comments inline.
"Garry W" wrote:
Anybody know of any really fresh and clean STL
implementation out there?
I need something like the STL for a big new project that
I've started in on.
And I've given up on the Microsoft implementation. When I
tried to use it I
immediately fell over several bugs in it that took a lot
of time to find. And
working with it has been really difficult because the code
is kind of
illegible. At least for the uninitiated. (Apologies if
there are authors
here!)
In my opinion, amount of bugs in MS C++ Library (which is
made by Dinkumware) is at least no greater than in any other
implementaion just due to simple fact that MS Lib is the
most widely used implementation in the world today. With
such huge base of users you find trivial bugs immediately
and nontrivial ones quite quickly. Prevalence of the library
is great advantage of it.
The code style is unreadable only at first glance. While
wandering there you'll get used to it rather quickly. The
good news that the code is really polished over generations.
It's by no means old project's hairy horror code. After
accustoming myself with Library's coding style I find
debugging within it quite pleasant (comparing to other code
that I have to deal with). Also, VC8 debugger's ability to
unroll containers and show actual types makes debugging
easier. Remember that once you adopt other library you will
need to write containter expansion rules (in `autoexp.dat')
from scratch.
So I've been "rolling my own", as the need arises. I can
tune to serve my
needs, and I have a (greater) prayer of figuring out the
bugs and of
understanding those lovely VStudio template error
messages. But rolling my
own, and making it right, is getting to be too much of a
time-consuming
process too.
Don't you feel it like reinventing the wheel while others
drive cars already? It can take several man-years to develop
anything decent that will be able to compete with existsing
libraries.
I did download StlPort back at the beginning of the
problems. But I quickly
discovered that StlPort doesn't compile (yet) under
VStudio 8 (2005). And
it's so heavily encrusted with preprocessor stuff that
it's rather hard to
work with too. The coding has much of the same
"encryption".
Anything else out there that's nice? Doesn't need to be
free. Doesn't need to
follow the STL spec as long as it does many of the
equivalent things. Does
there exist a "super sweet" STL (or equiv) for Visual
Studio?
"Nice" is vague definition. There are many project, which
based on MFC/ATL and use its built in collection classes for
their humble needs and happy with that. Regarding other
generic libraries. I used once RogueWave C++ library (which
constantly changes names). Now it called SourcePro C++
(http://www.roguewave.com/products/sourcepro/). It's decent
rich library with many goodies already built in (threading,
XML, DB connectivity, etc..). However, it's not free.
Another nice library is ACE
(http://www.cs.wustl.edu/~schmidt/ACE.html). If you have to
do heavy networking and thread lifting, then it definitely
worth a look.
HTH
Alex