From: "Юрий Соколов" Date: 2013-10-20T13:29:05+04:00 Subject: [ruby-core:57947] Re: [CommonRuby - Feature #9023] Array#tail --f46d043be1ee7cc0cf04e928cca6 Content-Type: text/plain; charset=ISO-8859-1 List (and Array) is a snake : everything but head is tail :) 2013/10/18 Fuad Saud > I can understand maybe tail is not the best name to describe this concept, > nor any of the other options. But it is still a pretty common idiom among > many functional languages. > > I like cdr, but it wouldn't make much sense to introduce it in ruby today > - it may confuse newcomers a lot, since that's not vey intuitive. > > Rest doesn't feel right. What is rest? It's a remainder, but if you drop > the last element, then what remains is still a kind of rest :/ > > Butfirst is weird for me, but bbatsov (powerpack maintainer) prefered it > over tail, and it makes it very clear what it means (e.g. > people.but_first.each do ... means iterate over people but the first). > --f46d043be1ee7cc0cf04e928cca6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
List (and Array) is a snake : everything but head is tail = :)


2013/= 10/18 Fuad Saud <fuadksd@gmail.com>

I can understand maybe tail is not the be= st name to describe this concept, nor any of the other options. But it is s= till a pretty common idiom among many functional languages.

I like cdr, but it wouldn't make much sense to introduce it in ruby = today - it may confuse newcomers a lot, since that's not vey intuitive.=

Rest doesn't feel right. What is rest? It's a remainder, but if = you drop the last element, then what remains is still a kind of rest :/

Butfirst is weird for me, but bbatsov (powerpack maintainer) prefered it= over tail, and it makes it very clear what it means (e.g. people.but_first= .each do ... means iterate over people but the first).


--f46d043be1ee7cc0cf04e928cca6--