develooper Front page | perl.perl6.language | Postings from December 2004

Re: pull & put (Was: Angle quotes and pointy brackets)

Thread Previous | Thread Next
From:
Smylers
Date:
December 5, 2004 14:09
Subject:
Re: pull & put (Was: Angle quotes and pointy brackets)
Message ID:
slrncr71o3.12n.Smylers@stripey.com
Dan Brian writes:

> Having push and pull operate on opposite ends of an array strikes me
> as more confusing than even shift.

It makes good sense to me -- if we're trying to move a piano from you to
me then either you can push or your end or I can pull on my end: we're
operating on different ends of it, but the effect in both cases is
moving in one direction.

Now instead of a piano imagine one of those conveyor belts that you get
at supermarket checkouts: you push your goods on one-end, and the
cashier pulls them off the other.  When the cashier pulls one item off
that unbreaks the light beam to the sensor, which triggers the motor,
and all the other items get pulled along too, moving one place along.

Smylers


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About