Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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

by scorpio17 (Canon)
on May 02, 2007 at 15:13 UTC ( #613180=note: print w/replies, xml ) Need Help??


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

I think "shift" comes from digital electronics, i.e., the 'shift register'. In textbooks, these are drawn as a group of little boxes, 1 box per bit, and data is shifted in from left to right (low order bit first). I've never seen the term "unshift" outside of perl, but I think it's a good term for "the opposite of shift".
  • Comment on Re: Why are "push", "pop", "shift" and "unshift" so named?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2019-11-21 18:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (105 votes). Check out past polls.

    Notices?