On Feb 12, 11:54=A0pm, Tom Link <micat... / gmail.com> wrote:
> > In this, you might want to do something like:
>
> > =A0 a =3D [:a,:b,:c]
> > =A0 h =3D a.to_hash
> > =A0 h[0.5] =3D :x
> > =A0 h[1.5] =3D :y
> > =A0 h[2.5] =3D :z
>
> How often did you actually want to do this during the past five years?
> Since you can quite easily convert an array into a hash the way you
> want it (by the use of #zip etc.), does this justify an extra method
> in Array or maybe even Enumerable?

Just to be clear, I'm not asking that it be put into core Ruby. Just
asking if it is a safe extension.

Nonetheless, I have a bit of a different theory about methods in a
language. I think it's good to have a lot of them. Just so long as the
name makes it very clear what they do. I understand there are
performance limits to this, so their are reasons to limit the number.
Also, there is unfortunately too much to learn in the industry these
days, so there's another reason, though a sorry one. Ultimately
computer languages need to become more like verbal ones, and verbal
languages have lots of words, 1,000s are used commonly. 10,000s
irregularly but are used. And 100,000s are available in total to
choose from. I don't think Ruby is going to implode b/c it includes a
few methods that are hardly ever used.

T.