News for hackers. Stuff that matters.
Re:Bundle Phobia: find the cost of adding an npm package to ... by styfle on Monday December 18, 2017 @01:18PM (#15953829)
They are bundled, it’s called ES6/ES2015. But for backwards compatibility, the userland packages are still used regularly.
Re:Bundle Phobia: find the cost of adding an npm package to ... by slig on Monday December 18, 2017 @02:28PM (#15954596)
> They are bundled, it’s called ES6/ES2015

I wish. See the `Set` implementation [1], for instance. It's lacking very basic stuff like union and intersection, forcing the user to copy/paste code or add another dependency.

Does someone know why they do that? Looking from the outside it seems that the committee in charge of this doesn't know what they're doing.

[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re:Bundle Phobia: find the cost of adding an npm package to ... by styfle on Monday December 18, 2017 @03:27PM (#15955156)
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.

Re:Bundle Phobia: find the cost of adding an npm package to ... by slig on Monday December 18, 2017 @08:53PM (#15957142)
But 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.
Re:Bundle Phobia: find the cost of adding an npm package to ... by styfle on Monday December 18, 2017 @09:38PM (#15957307)
I agree with you but there are ways to perform union and intersection with existing APIs.

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