Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
JS is special, for multiple reasons:
- no STL means packages need to do everything
- binary size is among the most important performance metrics and all the others are highly abstract
- tree-shaking means that you can import a 2GB package and use a three lines long function. If someone else in the dependency tree used the same function, you saved three lines from the final binary size -
C0D4681382y@lbfalvy for production sure.
For dev you need a 1TB hard drive at minimum these days to work with npm and the spawn of files. -
Good god! This looks like the plot of the size of our universe during the cosmic inflation phase!
-
In 2030:
"Scientists estimate that there are now more node modules than particles in the observable universe" -
irene33942yThe way to not use a million node modules is to be selective about what gets into the project. I had a project where the original devs believed “we shouldn’t write anything if there is a library to do it”. That was insane.
We had express middleware imported for permissions. They used one thing from it which was a wrapper around Array.prototype.includes(). -
@C0D4 I have a 1TB drive, and I'd much rather assume that all other devs do too than sacrifice even just 1kB of visitor bandwidth.
JS frameworks can and do save bandwidth while also adding flashy and unnecessary UI features and genuine quality of life improvements, you just need to execute some 50 steps perfectly to compose your own toolchain or use a metaframework such as Next and submit your dev hours to dependency hell. -
It's not a good situation but not as bad as people like to make it out to be. You can avoid any of JS' problems at the cost of others.
-
On the other hand, it's primarily a compatibility standard between web browsers so if you think you can deliver better bundle sizes and first render times with some other language transpiled to WASM or JS without carrying over the inherent problems then by all means go for it.
-
hjk10157312yThe graph is also wrong. CPAN for example has more than 250000 according to the graph looks more like 15000.
Related Rants
People use this to argue why node is better. I instead use it to show why node sucks. More is less. Be ready for 3gb node_modules.
joke/meme
node
js