4 ms·
> C and C++ dont really have package management to speak of I hear this complaint often, but I consider it a feature of C. You end up with much less third part
by dahfizz 5y ago
> C and C++ dont really have package management to speak of
I hear this complaint often, but I consider it a feature of C. You end up with much less third party dependencies, and the libraries you do end up using have been battle tested for decades. I much prefer that to having to install hundreds of packages just to check if a number is even, like in JS.
- dcgudeman 5y agoHmm yes, why stop there? Why have functions? Just reimplement business logic all over your codebase. That way each block of code has everything you need to know. Sure, functions have been adopted by every other language/ecosystem and are universally known to be useful despite a few downsides but you could say the same about package management and that hasn't deterred you yet.
- dahfizz 5y agoYou're arguing against a straw man. I could just as easily say "why not make every line of code it's own function?" C has libraries, and my comment made it clear that they are useful. Argue against my actual point: By not having a bespoke package manager, and instead relying on the system package manager, you end up with higher quality dependencies and with dramatically less bloat in C than other language ecosystems. It is all the benefit and none of the drawbacks of npm-like ecosystems.
- dcgudeman 5y agoI don't agree with your assessment that libraries in C are higher quality. Additionally I have yet to see a system package manager that enables developers to install dependencies at a specific version solely for a project without a lot of headaches. All the venv stuff in python is necessary python dependencies are installed system wide. The idea that the C/C++ ecosystem is better off because it doesn't have its own package manager is a bizarre idea at best.
- imtringued 5y agoI'm one of the few humans on the planet that installs his dependencies inside the project folder and uses PYTHONPATH.
- pjmlp 5y agoAh, that is why all major OSes end up having some form of POSIX support to keep those C applications going.
- dahfizz 5y agoYou need have some OS API, what is wrong with POSIX? And what does POSIX have to do with package management?
- remexre 5y agomy big personal nit is poor async support; e.g. async disk IO is recent in Linux, and AFAIK all the Unices implement POSIX aio as a threadpool anyway. not being able to wait on "either this mutex/semaphore has been signaled, or this IO operation has completed" is also occasionally very annoying...
- pjmlp 5y agoPOSIX is UNIX rebranded as C runtime for OSes that aren't UNIX.
- dahfizz 5y agoI don't even know how to parse that. POSIX is a standard which was based on the unix OS's of the time. POSIX is an API, not a runtime. Only Unix systems today implement posix (MacOs, Linux).
- pjmlp 5y agoYes it is a standard, just like ISO C one is, and traditionally they go go together, just like you never use IP on its own. I suggest you to have a look around RTOS, mainframes, BeOS, and even NT history regarding POSIX support.
- throwaway894345 5y agoI think you're contradicting yourself. You end up with fewer third party dependencies in C because C developers end up rewriting from scratch what they would otherwise import, and these rewrites have much less battle-testing than popular libraries in other languages. Moreover, they also have more opportunity for failure since C is so much less safe than other languages. Even in those few libraries which have received "decades of battle-testing" we still see critical vulnerabilities emerge. Lastly, you're implying a dichotomy between C and JS in a thread about Go, which doesn't have the same dependency sprawl as JS.
- steveklabnik 5y ago> You end up with much less third party dependencies, https://wiki.alopex.li/LetsBeRealAboutDependencies https://wiki.alopex.li/LetsBeRealAboutDependencies
- dahfizz 5y agoThis just proves my point. A complex, fully featured GUI application written in C needs 122 libs total. In Rust, just installing SQLx for sqlite bindings requires 75 crates. And sqlite is one very small part of what rviz does. An rviz equivalent written in rust would require an order of magnitude more dependencies.