On Tue, 23 Oct 2007 20:44:48 +0900, Robert Klemme wrote:


>> I always liked that visualization.  The problem for me (and I'm not the
>> OP) is that in Ruby you have to lift all the plates off, put the new
>> plate on the bottom, and then put all the plates back.  (Likewise when
>> you want to "pop" that plate.)  ;-)  (Because Ruby uses push and pop on
>> the end of the array instead of the beginning.)
> 
> I'm not sure what exactly you mean.  #push and #pop just work as one
> would expect from a LIFO.


Perhaps he means to work with a FIFO?

"Head or tail first

Authors and users of FIFO queue software should consider carefully the 
use of the terms "head" and "tail" to refer to the two ends of the queue. 
To many people, items should enter a queue at the tail, remain in the 
queue until they reach the head and leave the queue from there. This 
point of view is justified by analogy with queues of people waiting for 
some kind of service and parallels the use of "front" and "back" in the 
above example. Other people, however, believe that you enter a queue at 
the head and leave at the tail, in the manner of food passing through a 
snake. Queues written in that way appear in places that might be 
considered authoritiative, such as the GNU/Linux operating system, making 
the point of view hard to dismiss however repugnant you find the idea of 
getting your data from a snake's rear-end."

<http://en.wikipedia.org/wiki/FIFO>




-Thufir