[Insight-developers] linked list implementation
Damion Shelton
dmsst59@pitt.edu
Wed, 28 Mar 2001 15:15:46 -0500
Hi all...
Our work on a linked list pixel type is progressing well, but I have a
question of style... would it be considered "uncouth" to use our own linked
list class (which already exists), rather than the STL list class? After
playing with the STL implementation, the overhead of having to write an
allocator and iterator seems a bit wasteful. Here's the pro and con
arguments, from my POV, re. STL vs. our own class:
Pros:
Our linked list does not need the flexibility of templating, since it's only
intended to hold one type of object, and I find the STL method of accessing
list entries a bit counterintuitive.
We would have to derive a specialized class from list in any case, since our
"pixels" need to be able to do more than "ordinary" pixels.
Cons:
We would be duplicating existing functionality (sort of - we would still
need to specialize the list class and add extra functionality)
The STL implementation would in theory be more general / promote recycling
of our work.
This seems to be a problem analogous to the ongoing matrix discussion: do we
rewrite functionality for the sake of clarity or wrap for the sake of
portability? Any thoughts?
-Damion-