7.27.2011

Offline repost #2: Back off, think about something new

I'm still not done with lists and iterators. It must be some kind of pervert fascination I have with them. I just can't find a satisfying way of managing all that stuff while not limiting the user or having to blow up the code. I'm mainly having my problems with integrating rather "exotic" structures like singly lists. Normally, I'd be done with this in a few minutes, but since I want to finalize it as good as possible, I'm having my trouble with it. At first I want of course keep it with as few code lines as necessary. I moved away from inlining in favor of small code size - that will be necessary for the NXT. Second, I also want to keep it minimal in terms of interface design - I always sticked with simple, self-managing items with any need for a bigger list structures. Thus, it's hard to have the same comfort as when doin it direct. Sooo, I just want to squeeze and squeeze and squeeze. In all areas. And here we start with the problem that I'm coding singly and doubly linked lists side by side. I see them as extremely similar, though selectors/iterators are very different in how they performance due to the lack of similar internal structure. Some features require a shitload of unique checks, a few extra variables, special cases and so on. You start writing something and it goes boom later cause exactly this one case won't work but can happen very often. So it's simply not possible to keep them mentioned in a single sentence. Their are so different to control in effective access that I'm thinking about completely dropping them. I've a bunch of cool ideas, but all them are only possible with doubly-linked lists and for singly linked once... Well, let's say I just can't understand why anyone would want to use them except when storing millions of data elements and doesn't have enough memory for using a doubly linked. However, maybe he should think about using something different like an array, cause he'll need to iterate through the singly linked list as much as he would using an array... They simply have no advantage except decreased memory usage.

So no more singly lists. I'm having quite a big set of generic n-ary node collections and such, but there is no actual use for them outside. If I'm ever goin to need some structure that's recursive, I can surely build one if I want. But I don't see the necessity to use a generic singly linked list for that.

Oh and Wikipedia has an interesting article about XOR linked lists.

No comments: