Talk:Computer Science/Data Structures/List Structures content

I think this page should focus on the Sequence ADT, of which vector, linked list, and GSequence are instances.
 * GSequence has been put in the Advanced book.

Then Vector and Linked List can be presented with their efficiency tradeoffs. I'm thinking of Vector as distinct from Array because Vector supports resizing and the full Sequence interface. Thoughts? --jyasskin 20:11, 24 Jan 2005 (UTC)
 * I think the chapter should introduce first an abstract ADT that represents ordered collections of objects, i.e. "list" in the most general sense. Then, the array and linked-list representations can implement that ADT, both of which include a very, very simple iterator data type (with has-next and get-next for example, and nothing else). The array implementation of the abstract list ADT can then include the extra resizing (i.e., array copying) operations to be a vector. A final section could then show the tradeoffs and how, for example, inserting an item in the middle of a large vector is impractical, and how indexing the nth element of a long linked-list is impractical.
 * Note that the introduction has already covered chains of nodes, so conceptually introducing a linked-list won't be hard: it's just a wrapper, really, around node chains: in a node chain, an empty list is represented by a null pointer, and thus you cannot send messages to it. In a linked-list (if it implements the list ADT), you can always send messages, like get-size, even when there are no elements. (I think people get too caught up with "linked-lists" and miss the point that abstraction can insulate you from these details.) Overall, I'd rather the point about abstraction be the key message of the chapter (and the critical role that iterators play in isolating us from array or chains of nodes representations) than about the nifty but not as insightful point about efficiency. (It of course should be mentioned, but need not consume more than a couple of paragraphs.) MShonle 01:38, 25 Jan 2005 (UTC)
 * The page goes in this general direction now. Unless you have some further comments/change suggestions, I'll refactor this discussion in a few days to something like the following, except more coherent because I'll do it when I'm awake:
 * This page should focus on the benefits of abstraction. The tradeoffs involved in choosing between linked lists and vectors are an important side note, but should remain a side note and not distract from the main message, that when you do things through an ADT, it's easier to write your code generally and not have to change it later. --jyasskin 07:06, 27 Jan 2005 (UTC)


 * Side note: the array chapter needs to be simplified as well.
 * I think the arrays chapter covers the information it needs to, even if it's not in the best form. I'm going to treat its simplification as low priority until the rest of the chapters at least have an overview. --jyasskin 07:06, 27 Jan 2005 (UTC)

WikiBook pseudocode
When writing Data_Structures/Introduction I noticed that in Data_Structures/Introduction you use   ...   and here    ...    - Would be nice if you could make your mind up and which should I use for above article?

--Krischik 19:16, 14 Feb 2005 (UTC)