3 ms·
Agree, Set is a disappointment. I think the “Why” is because it’s easier to get everyone to sign off on small changes than large changes that can never be remo
by styfle 9y ago
Agree, Set is a disappointment.
I think the “Why” is because it’s easier to get everyone to sign off on small changes than large changes that can never be removed.
The web platform has to live for a long time and be backwards compatible.
- slig 9y agoBut the `Set` was completely new. And things like union and intersection are basic features and without it the `Set` thing is almost useless, so it wouldn't make any sense to remove they in the future as much as it didn't make sense to not include them now.
- styfle 9y agoI agree with you but there are ways to perform union and intersection with existing APIs. http://2ality.com/2015/01/es6-set-operations.html http://2ality.com/2015/01/es6-set-operations.html > Long-term, I expect JavaScript to have built-in functionality for this, e.g. via functions that operate on iterables