MS STL
-
Just wondering outloud, (and partially ranting, so be warned) Why on earth is the STL that comes with VC (the PJ Plaugher code) so completely unreadable? I am pretty sure that at any job I have ever had I would have been fired on the spot for writing such spunk. Seriously, if you guys were code reviewing someone who wrote something like that what would you do? Or do people just figure that, hey I'll never have to step through any of that cause it just works. I would think that with todays compilers we could afford variable names a bit longer that "_xT" or "_P". I am just utterly amazed that the code is published in the form that it is. X|
It was one of the reasons why many people decided to switch to better STL, especially STLPort X| Igor Proskuriakov
-
It was one of the reasons why many people decided to switch to better STL, especially STLPort X| Igor Proskuriakov
-
I have to admit I'm with you on this one. I have dabbled in STL a couple of times, but haven't got much further than simple use of lists and strings because the documentation is so bad. I suppose I should buy a book and learn that way, but I am put off by the poor doc.s Derek Lakin. Salamander Software Ltd.
I highly recommend The C++ Standard Library by Josuittis. But VC++ is so poor on compliance you'll end up pulling your hair out even with simple examples. (Some that come to mind are multimap, mem_fun and bitset). STLPort is a little better with it, but not great. CodeGuy The WTL newsgroup: 940 members and growing ... http://groups.yahoo.com/group/wtl
-
Yeah, what is mind boggling to me, is it almost seems as if someone went out of their way to make it impossible to read or debug. What would you do if someone working for you wrote somethign like this ? Personally I'd lobby for their being fired cause it is so irresponsible.
is it almost seems as if someone went out of their way to make it impossible to read or debug you are 100% correct. it is done on purpose. the purpose being: since it's not your code to maintain (or steal from, depending on your point of view), you have no business even looking at it. it's a way of 1. protecting intellectual property and 2. preventing you from changing the STL (because you don't know what you're changing) -c ------------------------------ Smaller Animals Software, Inc. http://www.smalleranimals.com
-
is it almost seems as if someone went out of their way to make it impossible to read or debug you are 100% correct. it is done on purpose. the purpose being: since it's not your code to maintain (or steal from, depending on your point of view), you have no business even looking at it. it's a way of 1. protecting intellectual property and 2. preventing you from changing the STL (because you don't know what you're changing) -c ------------------------------ Smaller Animals Software, Inc. http://www.smalleranimals.com
In Microsoft's case, that argument just doesn't hold water since ATL and WTL are reasonably readable. I would nearly bet that the only reason that many versions of STL are unreadable is that the original author or the HP group liked that style of coding. (God help HP...) Tim Smith Descartes Systems Sciences, Inc.
-
In Microsoft's case, that argument just doesn't hold water since ATL and WTL are reasonably readable. I would nearly bet that the only reason that many versions of STL are unreadable is that the original author or the HP group liked that style of coding. (God help HP...) Tim Smith Descartes Systems Sciences, Inc.
-
How much did MS bastardize their version? I have never seen the actual HP code but have seen all the HP copyright statements in MS-STL. I have been using STLPort for a while. I like it. (mostly because it works with Windows CE) Tim Smith Descartes Systems Sciences, Inc.
-
you kind of left us hangin there...:) Is that bad ? Is it as ugly as the MS stuff ?
-
is it almost seems as if someone went out of their way to make it impossible to read or debug you are 100% correct. it is done on purpose. the purpose being: since it's not your code to maintain (or steal from, depending on your point of view), you have no business even looking at it. it's a way of 1. protecting intellectual property and 2. preventing you from changing the STL (because you don't know what you're changing) -c ------------------------------ Smaller Animals Software, Inc. http://www.smalleranimals.com
>the purpose being: since it's not your code to maintain (or steal from, depending on your >point of view), you have no business even looking at it. Well OK, I presume you're argument is that since they don't have binary protection and have to include the headers (since no compiler I am aware of can compile the temaplate in an implementation file separate from it's declaration, though according to Bjarne this is supposed to be possible), then thisis a form of protection. That I'll buy, I gues I had never thought of that.
-
A lot has been done to improve the code base over the years. I use STLPort too. :) Tim Smith Descartes Systems Sciences, Inc.
Is it that difficult to set up ? I remeber a while ago I had heard that it was a major pain to get to work with VC 6 ? What about if you have a bunch of STL code already, and everything is declared using the namespace qualifier ? Is this a problem like: std::vector v; as opposed to vector v; Oops - a variable with only a letter - shame on me :)
-
we're using Dinkumware's STL. the next version will be easier to read. -c ------------------------------ Smaller Animals Software, Inc. http://www.smalleranimals.com
-
Is it that difficult to set up ? I remeber a while ago I had heard that it was a major pain to get to work with VC 6 ? What about if you have a bunch of STL code already, and everything is declared using the namespace qualifier ? Is this a problem like: std::vector v; as opposed to vector v; Oops - a variable with only a letter - shame on me :)
At least you didn't name your vector victor :-D Now that would have been obfuscation ;P Chris
-
At least you didn't name your vector victor :-D Now that would have been obfuscation ;P Chris
-
I have to admit I'm with you on this one. I have dabbled in STL a couple of times, but haven't got much further than simple use of lists and strings because the documentation is so bad. I suppose I should buy a book and learn that way, but I am put off by the poor doc.s Derek Lakin. Salamander Software Ltd.
Most of the initial burst of STL books are not much better that the MS supplied docs. The latest books do seem to be getting it right. The best I've read: Beginning/Reference : "STL Programming fron the ground up" (Herbert Schildt) "The C++ Standard Library" - A Tutorial And Reference" (Nicolai Josuttis Intermediate: "Effective STL" (Scott Meyers) - Like all Scott Meyers books - full of things you've never neard of, and would have taken years to discover for yourself! Advanced: "Modern C++ Design: Generic Programming and Design Patterns Applied" (Andrei Alexandrescu) - Brilliant, but VERY complex, and won't compile with VC++ !!!!!! -------------- Reg : "Well, what Jesus blatantly fails to appreciate is that it's the meek who are the problem."
-
That would have be vicarious. Of course the victor vector factor frequently forces ficticious fornication for fastidious frenzied friends freebasing fountains of frozen fecal findings.
You must be really bored today John. ;) Michael Martin Pegasystems Pty Ltd Australia martm@pegasystems.com +61 413-004-018 "Don't belong. Never join. Think for yourself. Peace" - Victor Stone
-
You must be really bored today John. ;) Michael Martin Pegasystems Pty Ltd Australia martm@pegasystems.com +61 413-004-018 "Don't belong. Never join. Think for yourself. Peace" - Victor Stone
-
Just wondering outloud, (and partially ranting, so be warned) Why on earth is the STL that comes with VC (the PJ Plaugher code) so completely unreadable? I am pretty sure that at any job I have ever had I would have been fired on the spot for writing such spunk. Seriously, if you guys were code reviewing someone who wrote something like that what would you do? Or do people just figure that, hey I'll never have to step through any of that cause it just works. I would think that with todays compilers we could afford variable names a bit longer that "_xT" or "_P". I am just utterly amazed that the code is published in the form that it is. X|
Why not ask instead why it's so _horribly_ outdated? Answer: Microsoft hasn't yet been able to create a C++ compiler. Not even through service packs have they been able to get it to the level needed to compile a conforming C++ library. Not to mention they have publicly stated they won't even try to create a C++ compiler until "the next version" after 7, i.e. MSVC8 (or what it will be called). This is not trolling, it's unfortunate facts that we have to deal with.
-
Just wondering outloud, (and partially ranting, so be warned) Why on earth is the STL that comes with VC (the PJ Plaugher code) so completely unreadable? I am pretty sure that at any job I have ever had I would have been fired on the spot for writing such spunk. Seriously, if you guys were code reviewing someone who wrote something like that what would you do? Or do people just figure that, hey I'll never have to step through any of that cause it just works. I would think that with todays compilers we could afford variable names a bit longer that "_xT" or "_P". I am just utterly amazed that the code is published in the form that it is. X|
There is a valid reason actually. Because of the debug information limitations of the debugger and compiler, the names were shortened to reduce "Debug information truncated" warnings. It doesn't completely get rid of them, but they're much better than they would be otherwise. -- Where are we going? And why am I in this handbasket?
-
Why not ask instead why it's so _horribly_ outdated? Answer: Microsoft hasn't yet been able to create a C++ compiler. Not even through service packs have they been able to get it to the level needed to compile a conforming C++ library. Not to mention they have publicly stated they won't even try to create a C++ compiler until "the next version" after 7, i.e. MSVC8 (or what it will be called). This is not trolling, it's unfortunate facts that we have to deal with.
Most likely it will be VC 7.1. However, your being intentional inflamatory here. MS has made great improvements in VC7 for standards conformance. -- Where are we going? And why am I in this handbasket?