From: Bob Hutchison Date: 2007-10-24T21:38:55+09:00 Subject: Re: pop/push, shift/unshift On 24-Oct-07, at 6:30 AM, Todd Benson wrote: > On 10/24/07, Todd Benson wrote: >> Not only that, but enqueue and dequeue return different objects. >> Enqueue returns an array, and dequeue returns the object that was >> shifted from the stack. >> >> Todd > > Hmm. I guess shift/unshift are like that too. Sorry for the noise. > > I'm surprised, though, that this thread has received so much > attention. I don't really have a problem with the terminology, or the > behavior of the methods pop/push/shift/unshift. In fact, the > shift/unshift methods were two of many things that attracted me to > Ruby. I know they exist in other languages, but I haven't experienced > the others in depth yet. I agree with you. I don't have any problem with the terminology, and I certainly appreciate the implementation. The only problem I have is the two specific deficiencies in the optimisation of un/shift. With some release after 1.8.5 this should be completely resolved, it is much better in 1.8.5 than in 1.8.4 I think. Cheers, Bob > > Todd ---- Bob Hutchison -- tumblelog at http:// www.recursive.ca/so/ Recursive Design Inc. -- weblog at http://www.recursive.ca/ hutch http://www.recursive.ca/ -- works on http://www.raconteur.info/ cms-for-static-content/home/