top | item 35840176

(no title)

W4RH4WK55 | 2 years ago

Well, my take is that the language isn't that great, but I really really dislike the ecosystem.

The sheer amount of code you get, even when using seemingly lightweight dependencies is just such a dumpsterfire.

I once ran cloc on a react getting started example. The example, including its dependencies, contained more than 3 times the lines of code than a 3D game engine (targetting PS4/5) + game logic + dependencies for a (non-indie) title I was porting around that time.

discuss

order

dagw|2 years ago

Honestly I find JavaScript better than, for example, Python on this front. JavaScript is pretty good at splitting up functions into individual packages and even better at using tree shaking to make sure you only ship the code you use. Many other languages have single huge packages that contain every single function vaguely related to a single area and no easy way to grab just one function. Also many language 'hide' most of their 3rd-party LoC inside pre-compiled .so files, rather than having it show up in the source tree.

In one case I has a 150ish LoC Python command line tool that I wanted to package up and distribute, and it came in at over 150 MB because I need a single function from sk-image, which contain 100s of image processing function plus pulls in all of both scipy and numpy as dependencies.

yowzadave|2 years ago

How many lines of code were from devDependencies (i.e., for use while developing) and how many ended up in the final production bundle actually intended to be served to the client?