cross-posted from: https://sh.itjust.works/post/64685863

Lots of programming languages have their own package manager, separate from the distribution or OS package manager.

Going loosely from the TIOBE index:

  • Python has Pip
  • C# has NuGet
  • Javascript has npm for Node.js
  • Visual Basic also uses NuGet
  • R has a repository of packages that can be installed by running install.packages("something") in R
  • Rust has Cargo/Crates
  • Go has the go get command
  • Swift has its own package manager swift package
  • Ruby has RubyGems
  • Java has Maven and Gradle (not sure if they are full package managers, or build automation tools with dependency resolution)
  • PHP has Composer for managing libraries and dependencies
  • C and C++ are the only exceptions I can think of, off the top of my head; libraries are managed by, and coupled to, the operating system
  • Feyd@programming.dev
    link
    fedilink
    arrow-up
    25
    ·
    1 day ago

    CPAN for perl was the first one and it was very successful so got copied.

    separate from the distribution or OS package manager.

    Because it is way easier to manage them this way rather than have every distro package repo also support them. Additionally, windows and Mac are also targets and they don’t have built in package managers.

    C and C++ are the only exceptions

    It is not as popular but https://conan.io/ exists. Personally, I miss working in c++ because the lack of a built in package manager made people manage dependencies more thoughtfully. It was not without tradeoffs but I preferred that world to adding a dependency being one command away.

    • Miaou@jlai.lu
      link
      fedilink
      arrow-up
      2
      ·
      3 hours ago

      the lack of a built in package manager made people manage dependencies more thoughtfully

      Unless your colleagues are idiots and now you get to maintain your own homemade “package” “manager”. I find conan to be bidet in a world of diarrhea.

    • Pamasich@kbin.earth
      link
      fedilink
      arrow-up
      3
      ·
      14 hours ago

      Additionally, windows and Mac are also targets and they don’t have built in package managers.

      Windows does have a built in package manager: winget.

      • Feyd@programming.dev
        link
        fedilink
        arrow-up
        6
        arrow-down
        1
        ·
        14 hours ago

        Sure, but it’s only 6 years old, much newer than every one in this post, to my knowledge only has applications rather than libraries, and sources packages from the windows store or the community repository which is just manifests rather than the actual code or binaries.

        In other words you’re technically correct, but it’s rather irrelevant