Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-4147

The standard library is missing a mutable.TreeMap implementation.

    Details

    • Type: Improvement
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Scala 2.12.0-M2
    • Component/s: None
    • Labels:
      None
    • Environment:

      standard library collection mutable Tree Set Map

      Description

      = problem =
      When converting code-bases as a proof of concept it is often necessary to have some working code after a short time. Having no mutable sorted implementations of Map is a big obstacle, because it forces code using it to be rewritten (which might make sense in a later step though) and makes it hard to argue that Scala is a good upgrade path from Java.

      = analysis =
      immutable.TreeMap exists but mutable implementation is missing in Scala's standard library.

      = enhancement recommendation =
      Scala should ship with support for this data structure.

        Attachments

          Activity

          Hide
          soc Simon Ochsenreither added a comment -

          TreeSet was merged in https://github.com/scala/scala/commit/51ddeb372b3f0b22041d9a51f3faee17acd7b749

          Now only mutable.TreeMap is missing.

          Show
          soc Simon Ochsenreither added a comment - TreeSet was merged in https://github.com/scala/scala/commit/51ddeb372b3f0b22041d9a51f3faee17acd7b749 Now only mutable.TreeMap is missing.
          Show
          soc Simon Ochsenreither added a comment - Would it be possible to add a row to http://docs.scala-lang.org/overviews/collections/performance-characteristics.html?
          Hide
          lpereira Lucien Pereira added a comment -

          Documentation has been updated Simon.

          Show
          lpereira Lucien Pereira added a comment - Documentation has been updated Simon.
          Hide
          ruippeixotog Rui Gonçalves added a comment -

          I may be needing this in one of my projects. If you're still into adding a mutable.TreeMap to the standard Scala collections, I can do a PR to 2.12.x once (and if) I'm able to implement it Personally, I think a mutable sorted map is more than common enough to warrant appearing in the standard lib of a programming language.

          Show
          ruippeixotog Rui Gonçalves added a comment - I may be needing this in one of my projects. If you're still into adding a mutable.TreeMap to the standard Scala collections, I can do a PR to 2.12.x once (and if) I'm able to implement it Personally, I think a mutable sorted map is more than common enough to warrant appearing in the standard lib of a programming language.
          Hide
          ichoran Rex Kerr added a comment -

          Note that this would also (arguably) resolve https://issues.scala-lang.org/browse/SI-6938

          Show
          ichoran Rex Kerr added a comment - Note that this would also (arguably) resolve https://issues.scala-lang.org/browse/SI-6938

            People

            • Assignee:
              prokopec Aleksandar Prokopec
              Reporter:
              soc Simon Ochsenreither
            • Votes:
              4 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: