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

Set / Map / List: Deprecate these modules #336

jmsmyth opened this issue Oct 10, 2016 · 0 comments

Set / Map / List: Deprecate these modules #336

jmsmyth opened this issue Oct 10, 2016 · 0 comments


Copy link

@jmsmyth jmsmyth commented Oct 10, 2016


Set and Map are well supported in browsers now. We should consider suggesting that users move over to these rather than hx.Map and hx.Set.

List is a more interesting one as there isn't a similar thing in ES6. The most useful part of list is the ability to remove items. One option would be to add a util method for removing an item from arrays and then deprecate hx.List in favour of this.

Using ES6 Maps and Sets will most likely give better performance than hexagon's and will allow us to decrease the size of hexagon slightly in the next major release.

This will obviously have some consequences - people will need to refactor their code, etc, so we might need to discuss a bit if we should mark this for the next major version (or the one after?).

Possible Fix

Add warnings when hx.Map and hx.Set (and hx.List?) are created by the user suggesting they use the built in javascript alternatives.

For now we should leave hexagon using hx.Map / hx.Set / hx.List internally until actually removed in the next major version, since changing to use ES6 features internally is probably enough to warrant a major version bump at the moment. Any uses of these classes internally should not show warnings in the console, so some kind of wrapper will be needed to get the warnings to show just when created by users.

Update the documentation to explain how to migrate from hx.Map / hx.Set to Map / Set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants