by qudat · 7y ago · 0 comments
This "argument" gets brought up every time there's an article about NPM. The STD library for node is relatively small so a lot of that work is outsourced to third-party libraries. The node binary is 17mb for mac os x, the node modules for a project end up 100-800mb maybe? So let's say binary + library size reaches 1GB. Now go and download visual studio to work on a C# project and wait for 15GB to be downloaded. I'm not arguing that relying on a third-party ecosystem is great as it does have legitimate security issues, but filesystem size is not the problem here.
How is that even remotely comparable. Perhaps compare .NET Core SDK vs NodeJS next time.
For example, in CSS, I don't need to import a module with the syntax for Grid, it's just...there, no extra typing required.
For example, take dictionaries (or maps). It lets you use a key (like "bob") to look up a value (like "555-555-1234" or "bob@spam.email").
Dictionaries are built into the language in Python, so to do the above, all you'd have to type is:
phones = { "bob": "555-555-1234" }
In Java, maps are part of the standard library. They're there, but you have to import them: import java.util.*
Map<String, String> phones = new HashMap<>();
phones.put("bob", "555-555-1234");
The main difference is that features in the standard library can be written in the language itself. Java's Map classes are written in Java, while Python's dictionary utilities are written in C.Other than that, the difference is largely semantics.
A better example would be the .net SDK which is a few hundred MB, but is far more featured.
The npm ecosystem is more comparable to nuget packages, but they are generally at a far more sane scope.
STD is an apt metaphor for something as promiscuous as node...