[sldev] 1.17.1 crashes

Dzonatas dzonatas at dzonux.net
Tue Jun 26 13:47:02 PDT 2007


Kelly Washington wrote:
> If anyone submits a patch that removes ALL uses of LLLinkedList (or any
> other home-brewed container class in our code) in favor of a std::
> equivelant I will personally work to get it into the release code as
> fast as possible.  This is a non-trivial task though.
>   

When someone asks one to write a linked list in C++ or C, it is not so 
trivial for many reasons. I'll just touch on the portable issue and 
avoid the legal patent issues (and other patent nonsense).

One could just write it out in plain C with full implementation and 
avoid any C++ containers. I'm sure C++ programmers usually bark at this 
technique. Actually, I know this because C++ programmers tend to watch 
the clock for how much time it takes to write out the implementation.

C++ programmers, instead, would rather see something like std::vector 
being used. It is quick to implement and probably avoids that jerky head 
look at the clock. The std::vector (and like) container(s) are not pure 
linked lists, however. They rely more on dynamic arrays. The benefits of 
a linked list are lost.

The trivial solution is to move the compiler to include the STL library, 
which is not in use by default. Then one could use the std::list<> template.

The STL library also adds the additional benefit of cross platform 
compatibility. For example, many of the wide character implementations 
under MSVC's STD library are not portable.  The STL library is the 
answer to make it portable.

I'd jump on it, but I have a treasury program of higher priority to 
write, first.

-- 
Power to Change the Void


More information about the SLDev mailing list