On Oct 23, 10:50 am, "Simon Schuster" <significa... / gmail.com> wrote:
> *yawn* oh, what? people have been using these terms for a long time?
> oh wow, yeah, clearly important.
>
> *ahem* but what about the idea that it's four points of inter-related
> methods? I guess that's not as important as tradition...
One of the strengths of Ruby is that it borrows good things from
various other languages such as method names. Often it will have the
Lisp name of a method as well as the Smalltalk equivalent, for
instance 'map' is from Lisp and 'collect' is from Smalltalk although
they are equivalent.

If you're new to programming and Ruby is one of your first languages
that won't be obvious. Pushing and popping items on and off a stack
are basic ideas in Computer Science and it's a good idea to be
familiar with the terms normally used as soon as possible. 'shift' and
'unshift' as Array operations I associate with Perl, and for people
who already know Perl, that is one less new name to learn.

Maybe 'enque' and 'deque' could be used as names for methods to put
items on the front of a Queue and remove items from the back somewhere
in Ruby - then you wouldn't need push/pop and shift/unshift depending
on which end of the queue you were operating on.

But I can't see any point in deliberately ignoring what has come
before - of course it is important to be familiar with terms people
have been using for a long time.

-- Richard