DEV Community

Discussion on: NPM hot-takes and the pitfalls of trivialization

 
dubyabrian profile image
W. Brian Gourlie • Edited

I actually feel like Java's standard library has improved considerably, especially with Java 8.

Tree shaking would solve the issue of depending on a handful of functions from a large library, but tree shaking also requires some effort to set up and can be imprecise due to the highly dynamic nature of javascript.

The biggest challenge at this point would be adoption. In practice, with so many packages depending transitively on things like left-pad and is-odd, introducing a consolidated package would likely just fragment things and make it worse.

Assuming that the issue of breaking thousands of packages à la left-pad is solved, I don't find micro-libraries to be particularly distasteful.