News for hackers. Stuff that matters.
Re:A proposal to add signals to JavaScript by rblatz on Sunday March 31, 2024 @03:39PM (#39887347)
The lack of signals isn’t remotely the largest issue with JS, and adding them has minimal impact for most users of JavaScript. The biggest issue is the lack of a standard library, resulting in npm hell in most projects.
Re:A proposal to add signals to JavaScript by phpnode on Sunday March 31, 2024 @04:37PM (#39887860)
JS does have a standard library and this proposal is about expanding it, so that’s good, right?
Re:A proposal to add signals to JavaScript by mrpepka on Sunday March 31, 2024 @05:30PM (#39888227)
Unless it's half-assed, clumsy and short-sighted, and we are stuck with it forever, because standard. Until one's implementation becomes a standard thanks to the fact it wins as a library (as jQuery did), it should not be slyly forced into the language.
Re:A proposal to add signals to JavaScript by alexchamberlain on Sunday March 31, 2024 @04:58PM (#39888019)
This is referenced in the proposal:

> JavaScript has had a fairly minimal standard library, but a trend in TC39 has been to make JS more of a "batteries-included" language, with a high-quality, built-in set of functionality available

I think the description "minimal" is fairer than "no" wrt the standard library.

Re:A proposal to add signals to JavaScript by preommr on Sunday March 31, 2024 @05:42PM (#39888308)
Strongly disagree - it's trivial for a project to just add a small std-lib, or add lodash as a single dep, or just add it directly as source code.

JS projects exist in npm hell because people have been taught to use a library to save typing 10 characters. No standard library is going to fix. Because someone can just call in a new lib that just curries something in the standard lib with minor improvements like caching.

Re:A proposal to add signals to JavaScript by qudat on Sunday March 31, 2024 @08:33PM (#39889625)
It's getting better. I can build a medium-sized, modern TS/React app with 12 dependencies. A large enterprise app will be closer to 30-40 which is still a marked improvement over previous dep lists.
Re:A proposal to add signals to JavaScript by hnbad on Tuesday April 02, 2024 @07:23AM (#39904493)
What do you think is missing from the "standard library" as of ES2024?

That's a complaint I've heard since ES3 if not earlier and the trend ever since ES2015 has been to address that so I'm genuinely wondering what you think the JS "standard library" (aka built-ins) is lacking right now.

Given the different environments JS runs in these days, I'm also okay with extending the definition of "standard library" to "things browsers should have as built-ins" or "things Node.js should offer as a built-in module".