Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Package managers per language are a (relatively) new endeavor. The oldest language I can think of that widely adopted it was Perl. Although, perl was quite ahead of it's time in a lot of ways, and php undid some the work of perl and went back to popularizing include type dependencies instead of formal modules with a package manager.

C++ "gets away" with it because of templates. Many (most?) libraries are mostly templates, or at the very least contain templates. So you're forced into include-style dependencies and it's pretty painless. For a good library, it's often downloading a single file and just #include-ing it.

C++ is getting modules now, and maybe that will spur a new interest in package managers. Or maybe not, it might be too late.



It's a relatively new endeavor, but it's also a requirement in 2025 if you want to be portable. The Linux ecosystem was focusing on installing dependencies system-wide for decades (that's how traditional `./configure.sh` expects things to work), and this approach is just inferior in so many ways.

The shenanigans people get into with CMake, Conan, vcpkg, and so on is a patchwork of nightmares and a huge time sink compared to superior solutions that people have gotten used to in other languages, including Rust.


Try to use cargo in a polyglot build and you will get into shenanigans as well, and I have already seen enough clever build.rs files.


I don't think it's a requirement and it does actually come with it's own set of foot guns. The problem is that these design decisions impact culture, which is why JS has a culture of importing far too many third-party packages. Which comes with it's own set of risks.

I agree overall that the C or C++ way of doing things is more cumbersome, but I don't think that's enough to write off those languages as a whole.


Certainly not enough to write them off on its own, but it is one of many problems.


C++ is _getting_ modules now? You must be kidding. How can this language, that adds more and more and more features every couple of years _still_ not have one of the most fundamental way to modularize code, splitting it into semantic units? Like ... what?! I did not think C++ would be that bad when it comes to foundational aspects of a programming language. This must be the result of silly obsession with OOP. The typical misuse of "we have classes, we don't need modules!". What other explanation could there possibly be for lacking such basic means of code organization.


Modules were added in C++20, but it's taken them this long to be implemented. Right now, only MSVC has full support according to https://en.cppreference.com/w/cpp/20


Anyone that cares about C++ package managers is already happily using vcpkg or conan, it is a solved problem.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: