From: Adam Prescott Date: 2011-12-05T10:23:03+09:00 Subject: [ruby-core:41485] Re: [ruby-trunk - Feature #5478] import Set into core, add syntax --14dae93996c7dbe5af04b34e28f4 Content-Type: text/plain; charset=UTF-8 On Sun, Dec 4, 2011 at 22:34, Joshua Ballanco wrote: > Actually, the bulk of Set's functionality is already built on top of Hash. > Personally, since the ability to create Hashes from comma-delimited > key,value lists has been removed in 1.9, I think reintroducing it to create > Set literals is not the worst idea in the world. > > Additionally, implementing Set functionality directly on top of Hash would > remove the unfortunate method call overhead that currently exists in the > Set library (note that the implementation of Set#include? is just a call > through to Hash#include?): > This really does seem to just be an argument via implementation details. I don't think that's the best approach. The point of implementation details is that they're just that. --14dae93996c7dbe5af04b34e28f4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Sun, Dec 4, 2011 at 22:34, Joshua Ballanco <jballanc@gmail.co= m> wrote:
Actually, the bulk of Set's functionality is already built on top = of Hash. Personally, since the ability to create Hashes from comma-delimite= d key,value lists has been removed in 1.9, I think reintroducing it to crea= te Set literals is not the worst idea in the world.

Additionally, implementing Set functionality directly o= n top of Hash would remove the unfortunate method call overhead that curren= tly exists in the Set library (note that the implementation of Set#include?= is just a call through to Hash#include?):

This really does seem to just be an = argument via implementation details. I don't think that's the best = approach. The point of implementation details is that they're just that= .
--14dae93996c7dbe5af04b34e28f4--