My one concern about the name #take was that it may imply removal. I was =
actually
thinking #pick for selection and #take for selection + removal. But =
set.delete(set.pick/take)
could work just as well. My main beef is that Sets have #first but no =
#pick.

As for Enumerable - I personally think that Enumerable is for anything =
that can enumerate
objects, and almost all the methods in Enumerable make sense for sets. =
That enumeration
will happen to occur in some order, but that order may not be =
meaningful. I think the mistake
is that #first is in Enumerable, because its presence implies a =
meaningful order when not all
Enumerable classes (such as Hash... well pre-1.9 Hash) need have such an =
order.

Michael Edgar
adgar / carboni.ca
http://carboni.ca/

On Apr 12, 2011, at 8:16 AM, redmine / ruby-lang.org wrote:

> #pop is often associated to stack operations, which implies an order. =
Unless a better name is found, isn't set.delete(set.take) enough ?
>=20
> #take can be an alias of #first but I'm not sure if Enumerable should =
be included in Set in the first place. In my POV, Enumerable is for =
elements that have a particular order.