-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Deprecate scala.collection.mutable.MultiMap #8005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I don’t see it as an argument to put it to the stdlib. It’s actually useful to have them in a separate module that we can update independently of the standard library. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before merging this, do we need stronger guarantees that collections in scala-collection-contrib are usable replacements for this, and more importantly, that that module is going to be published, eventually?
I'm fine merging this without any further guarantees, as the trait provides very little functionality. Also, I don't see anything that would prevent A lighter alternative than a full |
6a960fa
to
34f5d3b
Compare
(pushed a check file update) |
If this PR is merged, consider updating the documentation here: https://github.com/scala/docs.scala-lang/blob/master/_overviews/core/collections-migration-213.md#breaking-changes-with-old-syntax-still-supported |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable for 2.13.1.
In the new Scala-Collection-Contrib module, there exists all three of:
scala.collection.MultiDict
scala.collection.immutable.MultiDict
scala.collection.mutable.MultiDict
They probably even would have been called
MultiMap
, except that that would cause a name collision with the existingmutable.MultiMap
in the standard library.And so, there is no longer a need for the singular
mutable.MultiMap
implementation in the core library.I'd actually prefer that these two data structures (
MultiMap
/MultiDict
andMultiSet
/Bag
) would be included in core, since they are extremely useful to every day programming. Maybe that can be considered for a future release, but in the meantime we should probably avoid duplicatingMultiMap
here and there.Fixes scala/bug#11504
For additional context: scala/scala-collection-contrib#17