From: Jesse G. <je...@wi...> - 2004-08-21 19:55:33
|
Dustin Sallings wrote: [...] > I didn't expect to make an immutable doubly linked list, but I think > that the less mutable a structure is, the harder it is to introduce > bugs. For example, depending on the types of operations that get added > over time, it might become increasingly difficult to keep the count in > sync with the actual number of elements. Can you think of a specific example, or is this speculation? I only ask because I can think of compelling reasons to want a O(1) length function, and a mutable cnt would give it to me. I've already modified Dllist on my local machine to include it, and I'm attempting to run it through some testing to verify that the changes I made aren't buggy. -- Jesse Guardiani, Systems Administrator WingNET Internet Services, P.O. Box 2605 // Cleveland, TN 37320-2605 423-559-LINK (v) 423-559-5145 (f) http://www.wingnet.net |