Darren Duncan wrote:
> If a list is a set, does that mean that a list only contains/returns each
> element once when iterated? If a list can have duplicates, then a list
> isn't a set, I would think. -- Darren Duncan
Thus Mason's point about Bags. Really, I think that Mason's right in
that we sh
yary wrote:
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.
If a list is a set
Mason Kramer wrote:
> 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.
This. Re
Sorry:
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
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 calli
yary wrote:
> +1 on this
> On Mon, Oct 25, 2010 at 4:56 PM, Jon Lang 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
>>