Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Why are "push", "pop", "shift" and "unshift" so named?

by talexb (Chancellor)
on May 02, 2007 at 15:29 UTC ( [id://613184]=note: print w/replies, xml ) Need Help??


in reply to Why are "push", "pop", "shift" and "unshift" so named?

Since no one's mentioned the Pez dispenser here, I will. It's a toy that lets you 'push' candies into a stack, and then 'pop' them out.

Amd, as has already been mentioned, 'shift' comes from the assembler operation of the same name, and 'unshift' follows from that.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

  • Comment on Re: Why are "push", "pop", "shift" and "unshift" so named?

Replies are listed 'Best First'.
Re^2: Why are "push", "pop", "shift" and "unshift" so named?
by ysth (Canon) on May 02, 2007 at 23:05 UTC
    I just got an awful image in my head: a Larry Wall pez dispenser.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://613184]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2024-04-19 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found