5 ms·
> Even the guys on our Node team joke that the node modules folder is abhorrently large. More massive than a black hole is the most common meme. This "argument
by qudat 7y ago
> Even the guys on our Node team joke that the node modules folder is abhorrently large. More massive than a black hole is the most common meme.
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.
- tntn 7y agoWhy are you comparing the size of application dependencies to the size of an IDE that includes several compiler toolchains and tons of other build-only stuff?
- slooonz 7y agoBecause node_modules generally includes a "compiler toolchain" (webpack) too ?
- Sahhaese 7y agoVisual Studio is an IDE. 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.
- fuzzy2 7y ago> Now go and download visual studio to work on a C# project and wait for 15GB to be downloaded. How is that even remotely comparable. Perhaps compare .NET Core SDK vs NodeJS next time.
- chrisfinazzo 7y agoAs a bit of an accidental programmer (HTML, CSS, TeX, along with enough Node and PHP to dislike them both) can someone provide a concise distinction on the difference between the idea that something is "in the standard library" vs "part of the language?" 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.
- thomascgalvin 7y ago"Part of the language" means that the language's syntax directly allows you to do a thing, while "in the standard library" means that the functionality is included with all (or at least most) versions of the language, but the language syntax doesn't provide the feature directly. 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.
- thrower123 7y ago> The STD library for node STD is an apt metaphor for something as promiscuous as node...