> In frontend dev, I get that this means forcing users to download a library, but for many use cases 4 kb gzipped isn't a big deal (esp if CDNs are involved).
How about 0kb?
Whatever happened to shared-resource URLs, where there was a good chance the library was already cached?
Your breaks or has minimal functionality if the CDN is down.
Your site loads slowly if the CDN is under load
Your users are now leaked to the CDN (privacy issue)
Of course, if the resource is cached, it's less of an issue, but it's still an issue. If you don't care about those things, go ahead.
- In C's stdio, I've used a fraction of calls
- In Ruby/Rails + gems, I use a fraction of calls
- In Node/Express, I use a fraction of calls
- In frontend javascript, I use a fraction of the native calls
In frontend dev, I get that this means forcing users to download a library, but for many use cases 4 kb gzipped isn't a big deal (esp if CDNs are involved).
I think it'd be interesting to poll developers on what part of Lodash/Underscore causes them concern:
1. The extra download time/bandwidth
2. The extra costs of packaging (failed builds, extra packaging process)
3. The speed of computation (assuming that some native functions are faster)
4. The concern that libraries should only be used when they are highly utilized (e.g., at least 20% of a library's code should be used before it is appropriate to include it)