moonbitlang / core

MoonBit's Core library

Home Page:https://moonbitlang.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reorganize containers (like `hashmap`, `mutable_map`, etc) into a dedicated `collections` folder

jialunzhang-psu opened this issue · comments

Motivations

  • The list of packages in core is getting lengthy.
  • After putting different containers into a separate collections folder, it becomes more convenient to share implementation between containers. For example, hashmap and hashset share the same underlying Robin Hood hashing. mutable_set and mutable_map can share the red-black tree implementation. Maintaining just one copy of the implementation reduces redundant code and tests.

Concern

  • Suppose we have hashmap, hashset and robinhood_hash, three packages under the collections folder, while hashmap and hashset rely on robinhood_hash. How to make robinhood_hash invisible to the outside?

A potential PR is #324.