News for hackers. Stuff that matters.
Re:Today’s JavaScript, from an outsider’s perspective (2020) by donatj on Friday May 27, 2022 @10:47AM (#31530266)
> It's literally the name itself "node"_modules, it's designed to be used with node.

That’s the problem. It’s not JavaScript. It’s not any part of the ECMA standard, it doesn’t work in runtimes other than node (read: the browser) yet it lives in the .js files making them not truly JavaScript. You have split the language.

The syntax isn’t part of the language and was designed in such a way that it cannot be polyfilled. This lead to a thousand packagers that would not be necessary at all if a sane syntax had been chosen. The creator of node himself has said making node incompatible with the browser was one of his biggest mistakes.

https://medium.com/@imior/10-things-i-regret-about-node-js-r...

> There are also countless boilerplate project with webpack setup already so you can get reference from there.

That’s literally the other problem! People just copying boilerplate without understanding it. That’s not a proper solution. That’s not a maintainable project, that’s copying other peoples homework and getting yourself in over your head.

Re:Today’s JavaScript, from an outsider’s perspective (2020) by fendy3002 on Friday May 27, 2022 @11:03AM (#31530444)
If anything, it's not the fault of javascript, it's on node. However finding the popularity of it means that somewhat it's more suitable for many devs than the alternatives.

Well I can understand it. As I've used the previous generation of jQuery, knockout, etc, nodejs and it's tooling makes things easier to scale, even with bigger overhead cost.

EDIT:

> That’s literally the other problem! People just copying boilerplate without understanding it. That’s not a proper solution. That’s not a maintainable project, that’s copying other peoples homework and getting yourself in over your head.

Copy, make it run well, modify, learn is how I learn things. Without working example, it's magnitude times harder to learn something. The fact that people copy and use without trying to understand things is their fault, not the hundreds of boilerplate code.