Jump to content

Talk:Queue/Definition: Difference between revisions

Responses to concurrent threads.
(oops)
(Responses to concurrent threads.)
Line 3:
: 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. --[[User:Short Circuit|Short Circuit]] 19:20, 4 November 2007 (MST)
::I did not add that requirement, and I think it is wrong. Each language should implement it in the most natural way for the language. --[[User:Nirs|Nirs]] 07:04, 5 November 2007 (MST)
:::Ah. I should probably have looked at the history more carefully. --[[User:Short Circuit|Short Circuit]] 11:57, 5 November 2007 (MST)
 
* 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 10 ⟶ 11:
::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)
::I don't see a need to split the page, specially when there is only two entries. Wait until other people add more entries and then we can see if there is a real problem here. --[[User:Nirs|Nirs]] 07:04, 5 November 2007 (MST)
:::I like the idea of having a FIFO (implementation) page, if only to show how a FIFO works at a low level. Ditto other data structures. (Stack, linked lists, trees, etc.) I was up until 2AM last night working on an animated GIF for that purpose. I should have it finished tonight. --[[User:Short Circuit|Short Circuit]] 11:57, 5 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)
Cookies help us deliver our services. By using our services, you agree to our use of cookies.