I meant capable *in theory*. It's not in the spec right now for Sets or Bags.
On Oct 25, 2010, at 08:41 PM, Mason Kramer wrote:
> That sounds like a subclass of Bag to me.
> But I don't think that thinking about who is subclassing whom is is how to
> think about this in Perl 6. All of these types are capable of doing the
> Iterable role, and that is what methods that could operate on a List, Array,
> Bag, or Set, should be calling for.
> On Oct 25, 2010, at 08:08 PM, yary wrote:
>> +1 on this
>> On Mon, Oct 25, 2010 at 4:56 PM, Jon Lang <datawea...@gmail.com> wrote:
>>> As for the bit about sets vs. lists: personally, I'd prefer that there
>>> not be quite as much difference between them as there currently is.
>>> That is, I'd rather sets be usable wherever lists are called for, with
>>> the caveat that there's no guarantee about the order in which you'll
>>> get the set's members; only that you'll get each member exactly once.
>>> The current approach is of much more limited value in programming.
>> I think of a list conceptually as a subclass of a set- a list is a
>> set, with indexing and ordering added. Implementation-wise I presume
>> they are quite different, since a set falls nicely into the keys of a
>> hash in therms of what you'd typically want to do with it.