Skip to content
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

Suggestion for improving MultiMap #2608

Closed
scabug opened this issue Nov 10, 2009 · 7 comments
Closed

Suggestion for improving MultiMap #2608

scabug opened this issue Nov 10, 2009 · 7 comments

Comments

@scabug
Copy link

scabug commented Nov 10, 2009

Consider allowing types more general than Set in a MultiMap.

The current definition is: trait MultiMap[A, B] extends Map[A, Set[B]]

An example usage: if a ListBuffer could be used in place of a Set, then the MultiMap could be used to associate ordered, repeating values to the multimap key.

This request was raised and discussed on the scala-user mailing list:

Subject: MultiMap with a List instead of a Set?

http://old.nabble.com/MultiMap-with-a-List-instead-of-a-Set--to26199345.html

User suggestions include:

  • "I completely agree - I regularly use MultiMap-like functionality with List instead of Set; a generalization of it would be really useful"
  • "Could it also be generalized for any Seq[(A, Seq[B])], not only aMap [...] it would be nice to use with a PriorityQueue for timeline based data such as an animation or MIDI sequence etc. -- this way events that occur at the same time can be added individually but dequeued together."
@scabug
Copy link
Author

scabug commented Nov 10, 2009

Imported From: https://issues.scala-lang.org/browse/SI-2608?orig=1
Reporter: Richard Dallaway (d6y)

@scabug
Copy link
Author

scabug commented Nov 17, 2009

@adriaanm said:
we're happy to take a contribution for this one, please provide a patch with unit tests

@scabug
Copy link
Author

scabug commented Jan 4, 2015

@kanielc said:
@adriaanm Is this still an open problem?

@scabug
Copy link
Author

scabug commented Jan 4, 2015

@adriaanm said:
We haven't addressed this, as far as I know (nor do we plan to). Best check with Rex Kerr, who's focussed on the collections, on scala-internals, though (it's been 5 years, so it doesn't hurt to re-open the discussion first ;-)).

@scabug
Copy link
Author

scabug commented Jan 4, 2015

@adriaanm said:
See also #8783

@scabug
Copy link
Author

scabug commented Jan 31, 2015

@kanielc said:
Should this be closed as wontfix given https://groups.google.com/forum/#!topic/scala-internals/yYvR3k5l0jc
?

@magnolia-k
Copy link

MultiMap has been deprecated since Scala 2.13.0, and MultiDict from scala-collection-contrib is recommended as an alternative.

Isn't it appropriate to close this issue?

@SethTisue SethTisue removed this from the Backlog milestone Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants