STL (was Re: [CIRCLE] [CODE])

From: Chris Gilbert (chris@buzzbee.freeserve.co.uk)
Date: 06/21/00


Chris Proctor wrote:
> ObCircle:
>
> The STL . . . I haven't seen it discussed much here.
> I've been fiddling around with a chat server I'm writing in Perl, and keep
> wishing for ways to shove elements onto the end of arrays, hashes and
> regexps when coding on my MUD. Never took it much further because I'm
> lazy. However, a long-buried memory of a few classes on the Standard
> Template Library surfaced, and I realise that vectors and maps could be
> extremely powerful in this sort of context.

They can be, the recent standards on STL includes things like the
expected O of the functions for adding searching etc.  The thing I like
is that you can just throw stuff into them, without the bulk of
reallocating arrays etc.  In general I've found C++ to be helpful if you
turn some things into Classes, simply because you can make sure that all
the values are initialised, and memory is freed when the object is
destroyed.  The thing I'm thinking should be most useful is the string
class as it grows as you add stuff to, no more worrying about buffer
overflows.

I'm sure that someone said that Circlemud 4 was being done with STL?

> Is anyone using the STL out there? If so, is it useful enough to you that
> it could be worked into the standard distribution? ;-)

I'm using parts, I'm still close enough to circle that fixes etc work.
I believe that it won't make it into the 3.x version simply because it
requires a fairly major overhaul.  If you are interested in an STL'd
version of circlemud, I believe that leximud maybe what you're looking
for:
http://avp.dhs.org/leximud/

> Not a huge issue, I'm not going to migrate to the latest patch level
> anyway, most likely, just curious as to whether there are considerations
> I'm not aware of that would negate the usefulness.

Upgrading can be interesting, depends what level you're coming from, and
how much of it has been customised.

Chris


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT