RE: [GD-General] Eiffel
Brought to you by:
vexxed72
From: Brian S. <bs...@mi...> - 2001-12-24 18:55:03
|
Additionally, I think it's funny how most people who dislike STL say = that it's "too hard to debug". =20 I've often thought that you could take Elisabeth Kubler-Ross' five = stages of dying (denial, anger, bargaining, depression, and acceptance) = and map it pretty well to process of learning the STL. The earliest is = denial - the idea that the problem lies within STL rather than your own = code. =20 In the early stages, everyone gets bit by some aspect of STL. Example: = erasing items from containers can invalidate iterators. Let's say you = make that mistake. So you spend time trolling through obfuscated = template code trying to figure out what stupid mistake was made in the = STL, because God knows there's no bugs in your code. After you figure = out the problem, you might read the documentation and find that the = container is behaving exactly as advertised. =20 Or you might decide that you've had it at that point. I suspect that's = where a lot of people bail out. But the notion that the STL needs much debugging, or any really, is a = fallacy in my opinion. It can be hard to look at the code and figure = out what you're doing wrong, but I've never seen anyone in the denial = stage actually find a bug in it. --brian (not on the VC++ team, have never met Plauger, and am in no way = defending his coding style) -----Original Message----- From: Kent Quirk [mailto:ken...@co...] Sent: Mon 12/24/2001 8:15 AM To: Brian Hook Cc: gam...@li... Subject: Re: [GD-General] Eiffel I *really* have to disagree here.=20 The DESIGN of the STL is absolutely gorgeous. I have never seen another container library that has such a neat separation of containers, iterators, algorithms, and data. The more I use the STL the more I love its design.=20 Yes, there are warts on the usage of the STL that mostly come from limitations in C++. Plauger's implementation (for Microsoft) is appalling in its use of (nearly) obfuscated variable names, etc. But I have found that idiomatic use of the STL drastically reduces both the amount of code I have to write and the number of errors I make in that code. One of my frustrations with Java is the lack of ability to write anything like the STL in it. It's a frustration because I otherwise like it a great deal. STLPort fixes a lot of the problems with MS's version, btw, though it's still not perfect. Kent Brian Hook wrote: >=20 > At 10:08 AM 12/21/2001 -0500, Thatcher Ulrich wrote: > >but IMHO the STL stinks as far as usability goes. >=20 > THANK you for saying that. I'm so tired of people going on and on = about > how great STL is (it's probably the #1 validation of C++ and templates = I've > seen), when in fact IT'S NOT THAT GOOD. It's convoluted, difficult to > debug, has bizarre syntax, takes forever to compile, generates tons of > warnings, requires third party implementations for stability. The = only > reason people dig on it is that they didn't have to write it. >=20 > Someone should sift through the STL source code some time then come = back > and tell me it's GOOD. >=20 > The primary advantage is that if you need a List or a Map you can just = use > STL without having to reroll it, but since I have that stuff lying = around > anyway, it doesn't bother me. --=20 ----------------------------------------------------------------------- Kent Quirk | MindRover: "Astonishingly creative." Game Architect | Check it out! ken...@co... | http://www.mindrover.com/ _____________________________|_________________________________________ _______________________________________________ Gamedevlists-general mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-general |