Talk:Data Structures/Stacks and Queues

Note on Style
I think the current module is too low-level. First, templates (or typing the structures) isn't really important in telling the story. (When implementing the code, it's obvious that in, say, C you need to specialize the structure to suit only one data type (or use preprocessor hacks), while it's obvious in C++ that you can use templates, and finally it's obvious in a language like Scheme you don't even need to type anything.) The approach should follow the Introduction chapter, which ignores these issues: Data_Structures/Introduction.

Instead of code that messes with pointers, it should be using the Node ADT functions. Instead of trying to make the Data-Structures OO, it should be more functional/procedural: when done properly, it will be obvious how the code can be made OO. That is, we should follow an OO style, but not actually use a pseudocode language that is itself OO. We are using abstraction heavily, but we aren't concerned with say polymorphism or inheritence, which has very little relevance to introductory data structures. MShonle 22:15, 23 Jan 2005 (UTC)

[[Media:[[Media:[[Media:[[Media:[[Media: – ]]]]]]]]]]==get-size== If we have a get-size function we might as well keep a counter in the main stack/queue structure that holds the integer field along with head and tail node references. Any objections if I do that? Also, are there any objections if I deCamelCase the function names to use the hyphen instead? (The Algorithms book uses this policy.) MShonle 01:20, 25 Jan 2005 (UTC)
 * I've deCamelCased the function names. I generally think that keeping track of the size belongs in the list if anywhere. Really, there are very few stack or queue algorithms that ever need to get the size of the structure, so my feeling is that it shouldn't even be in the interface. --jyasskin 17:50, 27 Jan 2005 (UTC)

Content clarity
There seems to be a mixing up of data structure and data type concepts, or at least a lack of distinction that should be addressed. --Panic (discuss • contribs) 03:46, 8 November 2011 (UTC)