scala-collection-contrib icon indicating copy to clipboard operation
scala-collection-contrib copied to clipboard

MultiDict and MultiSet should be either abstract traits or concrete implementations

Open joshlemer opened this issue 6 years ago • 1 comments
trafficstars

Currently the pattern between MultiDicts and MultiSets are different:

  • MultDict is a concrete collection
  • MultiSet is an abstract data type (trait) with a public concrete implementation MultiSetImpl.

I lean more towards the abstract data type approach of MultiSet, since it is consistent with the rest of the collections. Though the name MultiSetIml/BagImpl isn't very good. Perhaps CountedMultiSet/CountedBag extends MultiSet/Bag?

joshlemer avatar Jul 03 '19 20:07 joshlemer

If the intermediate trait is not needed or useful, I would remove it.

julienrf avatar Jul 04 '19 07:07 julienrf