Hacker News new | ask | show | jobs
by dagw 1143 days 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.