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|
-
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|
-
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|
Actually, the source code doesn't bother me as much as the documentation. Total lack of effort ... ugh. CodeGuy The WTL newsgroup: 940 members and growing ... http://groups.yahoo.com/group/wtl
-
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|
Jim, The STL that will ship with VC++ .NET is *slightly* more readable. Whereas I don't believe there were any variable names longer than 2 letters in the 6.0 source, the 7.0-level source, at least, uses names like "_First" and "_Last" (iterator code...) :) Also, the documentation for STL has been brought inline with the rest of the VS.NET documentation, and should be much more helpful. Regards, Nick Hodapp This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.
-
Heh, it just isn't MS. Lots of that code came directly from the source. Tim Smith Descartes Systems Sciences, Inc.
Well actually I'm not blaming MS at all. If there is anyone to blame I guess it would be PJ or whatever the guys name is who actually wrote the code. I am just continually amazed at how unreadable it is - how would you even debug something like that ? What a nightmare
-
Well actually I'm not blaming MS at all. If there is anyone to blame I guess it would be PJ or whatever the guys name is who actually wrote the code. I am just continually amazed at how unreadable it is - how would you even debug something like that ? What a nightmare
-
Actually, the source code doesn't bother me as much as the documentation. Total lack of effort ... ugh. CodeGuy The WTL newsgroup: 940 members and growing ... http://groups.yahoo.com/group/wtl
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.
-
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|
Hi, A good book to get started on STL (and general C++ too) is "Practical C++", published by QUE and written by Rob McGregor. Even I could follow it and write programs in it. Actually STL is not bad at all - the MS docs ARE rubbish. I wonder why, I wonder why, I wonder why I wonderI wonder why, I wonder why, I wonder why I wonder ...
-
Hi, A good book to get started on STL (and general C++ too) is "Practical C++", published by QUE and written by Rob McGregor. Even I could follow it and write programs in it. Actually STL is not bad at all - the MS docs ARE rubbish. I wonder why, I wonder why, I wonder why I wonderI wonder why, I wonder why, I wonder why I wonder ...
Actually I know STL really well, and I'm quite comfortable with it, my problem is wanting to know how someone could publish such horrid, unreadable garbage! Oh well, such is life I suppose !
-
Jim, The STL that will ship with VC++ .NET is *slightly* more readable. Whereas I don't believe there were any variable names longer than 2 letters in the 6.0 source, the 7.0-level source, at least, uses names like "_First" and "_Last" (iterator code...) :) Also, the documentation for STL has been brought inline with the rest of the VS.NET documentation, and should be much more helpful. Regards, Nick Hodapp This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.
the 7.0-level source, at least, uses names like "_First" and "_Last" (iterator code...) Wow! That's what we call 'progress'! ;P BTW: any debug checks a'la STLPort in STL shipping with VC++.NET? Tomasz Sowinski -- http://www.shooltz.com
-
No argument from me. That stuff is a nightmare. People need to learn what the spacebar is for and how to comment code. Self documenting code is a myth! Tim Smith Descartes Systems Sciences, Inc.
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.
-
Actually I know STL really well, and I'm quite comfortable with it, my problem is wanting to know how someone could publish such horrid, unreadable garbage! Oh well, such is life I suppose !
Maybe this PJ guy wanted to compile this source on 2-bit compiler running within 1KB memory space. You know, some embedded stuff :-D Tomasz Sowinski -- http://www.shooltz.com
-
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 ?