TECH: STL / Heaps, etc. (was: [MUD-Dev] TECH DGN: a few mud server design questions (long))

Adam Martin ya_hoo_com at
Sat Aug 4 10:19:38 New Zealand Standard Time 2001

----- Original Message -----
From: "Caliban Tiresias Darklock" <caliban at>
> On Thu, 2 Aug 2001 10:50:21 -0500, "Eli Stevens"
> <listsub at> wrote:

>> I love the standard template library.  Unabashedly.  ;) Of
>> course, it helps that it is for my language of choice and that I
>> like templates just a little too much (when templates are your
>> only tool, everything looks like a nail :).

> Something I've been breaking myself of for the past few years is
> various C habits which perpetuated into my C++ programming -- like
> using printf instead of cout, structures instead of classes,
> global functions instead of methods. Templates are a reasonably
> recent addition to my array of skills, and while they're certainly
> useful for data structures of this nature, I don't find them
> useful for much else.

> It's also much easier for me to write up my own ad hoc
> implementation than it is to examine and understand the STL
> version, so unless my needs are trivial I tend to avoid it. If I
> need a simple binary tree of records for searching, hey, STL is
> great; three lines of code, and I'm hooked up. But if I need
> something a little more complex, like a binary tree of node
> *lists* in which the left child of each node is a list of nodes
> with no children and the right child of each node is a list of
> nodes with children, STL is a much bigger headache than it is a
> convenience.

I've never spent enough time with C++ to use STL properly (so I may
have misundstood its purpose), but surely the point is that with all
templates and standard libraries there is a high barrier to using
them the first time, but once you are familiar with them (i.e. have
used the various bits a few times) you can make new programs much
faster (to code, and one would hope usually to run too, in the case
of libraries) than you could using your own hacks, otherwise what is
the point?

Adam M
MUD-Dev mailing list
MUD-Dev at

More information about the MUD-Dev mailing list