Talk:Queue/Definition: Difference between revisions

Content added Content deleted
(comment on usage/implementation distinction; propose solution; also on specificity of implementation requirement.)
(Calling '''Nirs''')
Line 1: Line 1:
The last line of the task description states ''Define the data structure for a FIFO element. Said element should contain a data member capable of holding a numeric value, and the link to the next element should be mutable.'' The Python example first provided does not satisfy this requirement. It seems that the Python example should be expanded to include a definition of the data structure for a FIFO element.
The last line of the task description states ''Define the data structure for a FIFO element. Said element should contain a data member capable of holding a numeric value, and the link to the next element should be mutable.'' The Python example first provided does not satisfy this requirement. It seems that the Python example should be expanded to include a definition of the data structure for a FIFO element.
- [[Waldorf|Waldorf]] 4 November 2007
- [[Waldorf|Waldorf]] 4 November 2007
: Python's dequeue looks like it implements generic programming; The data structure that would need to be defined is actually internal to the dequeue class. In my opinion, languages which have (either through built-in features or public libraries) features that simplify the implementation of the task should have those features demonstrated in examples. In this case, I would suggest exempting Python from the task requirement. Considering the FIFO data structure is a fairly generic and common one, I would ask '''Nirs''' if that requirement is necessary, or if it could be reworded.


* The Python example is usage of language/library features, whereas the Ada example is of implementation; these are both useful things to have. I suggest that the task be rewritten to allow for both implementation and usage examples, or that they be split into two task pages.
* The Python example is usage of language/library features, whereas the Ada example is of implementation; these are both useful things to have. I suggest that the task be rewritten to allow for both implementation and usage examples, or that they be split into two task pages.
Line 6: Line 7:
*: If no one has any objection, I will split the pages in this manner, and contribute examples to both.
*: If no one has any objection, I will split the pages in this manner, and contribute examples to both.
*: --[[User:Kevin Reid|Kevin Reid]] 17:46, 4 November 2007 (MST)
*: --[[User:Kevin Reid|Kevin Reid]] 17:46, 4 November 2007 (MST)
::I agree that both usage and implementation should get their own pages. The same should probably go for the (x) Linked List and Stack tasks as well. --[[User:Short Circuit|Short Circuit]] 19:13, 4 November 2007 (MST)


Separate issue: Wouldn't it be better to not require a particular implementation strategy? Mutable links, for example, would be unnatural in certain languages. I propose that the requirement that "elements" be defined be removed. --[[User:Kevin Reid|Kevin Reid]] 17:46, 4 November 2007 (MST)
Separate issue: Wouldn't it be better to not require a particular implementation strategy? Mutable links, for example, would be unnatural in certain languages. I propose that the requirement that "elements" be defined be removed. --[[User:Kevin Reid|Kevin Reid]] 17:46, 4 November 2007 (MST)
: It would probably be more appropriate to re-word the description like "If no appropriate data structure exists within the language or common libraries, define an appropriate data structure supporting (...)." While FIFOs are common enough data structures that I would expect them to be possible in most languages, I would still ask '''Nirs''' if there was a reason he specified that the link be mutable. --[[User:Short Circuit|Short Circuit]] 19:13, 4 November 2007 (MST)