Skip to content

Explain a bit more the difference between Hashtbl and Maps - #3631

Open
LordPatate wants to merge 3 commits into
ocaml:mainfrom
LordPatate:LordPatate-hashtbl-vs-maps
Open

Explain a bit more the difference between Hashtbl and Maps#3631
LordPatate wants to merge 3 commits into
ocaml:mainfrom
LordPatate:LordPatate-hashtbl-vs-maps

Conversation

@LordPatate

Copy link
Copy Markdown
Contributor

The current Hashtbl introduction mentions multiple differences to chose one or the other, but only gives one advantage to Hashtbl.
It is not obvious why would one chose Maps over Hashtbl.
The advantages of Maps were never mentioned, while the main advantage of Hashtbl was present in their own page.
Unless the reader dived into the library or did their own research on self-balancing binary search trees, Maps could seem like a "worse" Hash Table; or only exist for the functional interface.

I tried adding a little more information without going into too much detail and referenced Wikipedia for more.

The current introduction mentions multiple differences to chose one or the other but only gives one advantage to Hashtbl.
It is not obvious why would one chose Maps over Hashtbl.
Discuss a little bit more the differences, especially the advantages over Hashtbl, without going too much into the details.
The advantages of Maps were never mentioned, while the main advantage of Hashtbl was present in their own page.
Unless the reader dived into the library or did their own research on self-balancing binary search trees, Maps could seem like a "worse" Hash Table; or only exist for the functional interface.

@cuihtlauac cuihtlauac left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @LordPatate. Make sure to only use capitals for standard library module names or tutorial titles, data structures don't need them

Comment thread data/tutorials/language/3ds_02_maps.md Outdated
Comment thread data/tutorials/language/3ds_02_maps.md Outdated
Comment thread data/tutorials/language/3ds_04_hashtbl.md Outdated
Comment thread data/tutorials/language/3ds_04_hashtbl.md Outdated
Comment thread data/tutorials/language/3ds_04_hashtbl.md Outdated
Comment thread data/tutorials/language/3ds_02_maps.md Outdated
Use capitals for standard library module names or tutorial titles

Co-authored-by: Cuihtlauac Alvarado <cuihtlauac@users.noreply.github.com>

@cuihtlauac cuihtlauac left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LordPatate here are polished suggestions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants