Honestly I think the main thing that the JS ecosystem does well is dependency / package management (npm). The standard library is very small so everything has to be added as a dependency in package.json, but it mostly works without any of the issues you often see in other languages.
Yeah, it’s not perfect, but it’s better than anything else I’ve tried:
Python’s approach is pretty terrible (pip, easy_install, etc.) and global vs local packages
Ruby has its own hell with bundler and where stuff goes
PHP has had a few phases like python (composer and whatnot) and left everyone confused
Java needs things somewhere in its $PATH but it’s never clear where (altough it’s better with Gradle and Maven)
C needs root access because the only form of dependency management is apt-get
In contrast, NPM is pretty simple: it creates a node_modules and puts everything there. No conflicts because project A uses left-pad 1.5 and project B uses left-pad 2.1. They can both have their own versions, thank you very much.
The only people who managed to mess this up are Linux distributions, who insist on putting things in folders owned by root.
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
Posts must be relevant to programming, programmers, or computer science.
No NSFW content.
Jokes must be in good taste. No hate speech, bigotry, etc.
Honestly I think the main thing that the JS ecosystem does well is dependency / package management (npm). The standard library is very small so everything has to be added as a dependency in package.json, but it mostly works without any of the issues you often see in other languages.
Yeah, it’s not perfect, but it’s better than anything else I’ve tried:
In contrast, NPM is pretty simple: it creates a node_modules and puts everything there. No conflicts because project A uses left-pad 1.5 and project B uses left-pad 2.1. They can both have their own versions, thank you very much.
The only people who managed to mess this up are Linux distributions, who insist on putting things in folders owned by root.
You can use
~/.local/lib
andLD_LIBRARY_PATH
for shared libs.Or better yet just give in and use the
nix
package manager, it is basically a virtual environment for your C programs.