Talk:Queue/Definition: Difference between revisions

comment on usage/implementation distinction; propose solution; also on specificity of implementation requirement.
(Question about the completeness of the first Python example.)
 
(comment on usage/implementation distinction; propose solution; also on specificity of implementation requirement.)
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.
- [[Waldorf|Waldorf]] 4 November 2007
 
* 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.
*: Usage examples are useful for "how to accomplish this in this language"; implementation examples are useful for "here's a program in this language" or "how to accomplish" if there is no library; both should have their places in Rosetta Code, and I think we should consider how to handle this problem in general. At the moment, I think that "FIFO (usage)" and "FIFO (implementation)" would be a good technique, with the usage examples pointing to the implementation examples when applicable.
*: 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)
 
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)