Re: Languages

From: Chris Jacobson (
Date: 03/05/99

On 3/5/99 9:33 PM, George ( stated:

>How do people feel about C++ with STL?

STL is a good system but is too generic for most purposes.  Problems with
STL include not being able to remove an item from a container class
during iteration unless you pass the iterator.  This eliminates any
chance of removing an item in any function during, for exmaple, the
violence loop in fight.c.  If you remove the current item in any loop
above you without passing the iterator, you invalidate the iterator and
risk crashing.

Second, string is case sensitive.  Of course you could override it but it
lacks other features such as substring facility on some versions of STL.

Third, the map<> class works via linked list, IIRC, thus deminishing its

MUD++ and LexiMUD overcome these problems by using custom classes.  In
LexiMUD I still use standard char *s, but am working on a copy-on-write
String class that is case insensitive in == comparisons, supports
substring and sub-substring (ex: pointing to somewhere after the
beginning of the string yet still using a shared string) to replace them.
 I use custom LList w/ LListIterator and Vector classes that are
iterator-depth-safe (and will be thread safe soon), and a Map<> class
that uses a Vector and uses cached binary-search.

<plug>These classes are available to anyone who asks, but be warned that
you need EGCS 1.0.1, 1.1 or newer is preferable.  I do not know how well
GDB 2.8 works with them, but since I uses namespaces and other features
2.8 does not support, I haven't been able to test it.

Also, the LexiMUD codebase will be available to the public within the
year - possibly the next serveral months.  It is a RoleMaster/SpaceMaster
based MUD, rather than AD&D/FF based (I say FF since AD&D does not have

- Chris Jacobson

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 12/15/00 PST