RE: Design of STL was RE: [GD-General] Eiffel
Brought to you by:
vexxed72
From: Idahosa E. <ida...@sw...> - 2001-12-24 23:51:08
|
Well STL could never compete with your own custom library. Is it STL like? Or does it just implement the containers and algorithms in a way that is intuitive to you as opposed to being general purpose? If I was writing containers and algorithms for MY own purpose then I would write them much differently than if I was writing just a custom port of the STL. -----Original Message----- From: gam...@li... [mailto:gam...@li...]On Behalf Of Brian Hook Sent: Monday, December 24, 2001 1:02 PM To: gam...@li... Subject: Design of STL was RE: [GD-General] Eiffel > Behalf Of Kent Quirk > > I *really* have to disagree here. > > The DESIGN of the STL is absolutely gorgeous. I didn't mean to comment on STL's design, only the practical implications involved with its implementation (both in terms of choice of language and the actual implementations such as Microsoft's). A paper on genericity in C++ vs. Eiffel: http://www.elj.com/eiffel/ij/templates/ > 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. Compared to writing that code yourself, or not using those data structures at all, or what? When I started using STL I decided I liked it simply because all too often when I was in a hurry I would do stupid things like linear searches instead of taking the time to dig up a proper class that did binary searches or whatever. So I thought STL was cool simply because it forced me to use appropriate algorithms when I was too lazy to implement them ("I'll fix it later"). But now that I've written my own, I find I'm much happier with own implementation instead of using STL's. > 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. I'm coming back around to liking Java. Since it lacks true generic programming, it uses a SmallTalk/Obj-C style of container where casting is required. However, this is not fundamentally a bad thing unless you're religious about static type checking (in which case, Eiffel seems to be a better philosophical match than C++). I happen to like Obj-C and Java's introspection mechanisms since you can code a lot of very powerful stuff without forcing it all to be generated at compile time. You can also change your generic code WITHOUT FORCING A RECOMPILE OF ALL CLIENTS. This is just, well, huge, in my book. I don't want to export my code to everyone that is using my class libraries; and I sure don't want them to have to recompile just because some implementation detail has changed. Brian _______________________________________________ Gamedevlists-general mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-general |