HaloO,

Darren Duncan wrote:
And if Seq and Set etc are interchangeable for all situations where it doesn't matter whether the elements are ordered or not, then a lot of times users won't have to care which they have.


One can argue that we have the subtyping chain Seq <: Bag <: Set for
these immutable types. The idea is that a Bag is a multiset, that is a
set that maintains a multiplicity per element. Apart from that it
behaves like Set. The Seq would add an order to the elements and some
functionality that builds on that order. The good thing would be that
Seq literals are applicable where Sets are expected.

Regards, TSa.
--

Reply via email to