Hacker News new | ask | show | jobs
by fc417fc802 3 days ago
Exactly. Reading that entire exchange I just kept thinking things like "but why would you want that" and "but doesn't that lead to insecure software".

When I use languages that aren't C or C++ I actually audit my dependencies and I don't adopt libraries that would transitively add half a dozen to my project. The result is that I generally can't find acceptable candidates and I end up rolling my own. So I very strongly prefer to remain in the C++ ecosystem where I can check a header only solution into my source tree and just get on with life. (Related, eigen is a work of art.)

But if you really feel you need package management and you can't stomach cmake then consider an agnostic nix-alike or the one that your OS relies on rather than something language specific. Package management should be left to dedicated package managers. I shouldn't need half a dozen different managers pulling from their own centralized repositories.

1 comments

Oh yea, it's the way every other popular language does it that is unsafe. Not C++.

Custom and out of date code we manually audit is better than packages that can be automatically scanned for known issues.

I realize you're being sarcastic but I unironically agree. Code shouldn't constantly churn.

You can still scan for known issues. Rather than checking version strings in the case of full repos you can check branch names or commit hashes. In the case of individual files you can look at checksums. You can even scan your source tree for known snippets.

Why not have a manager for that sort of thing then?
You mean an automated vulnerability scanner that can sift through bare repos and raw source code to flag known issues? Isn't that exactly what I was describing? Does that not already exist?
I mean yeah probably, I would say custom code that isn't doing critical things like cryptography is more secure. It's a much smaller supply-chain risk, you understand it better, and you can patch it immediately. It's never be easier with LLMs. There's just very little value to a lot of dependencies now.

People also don't consider that most dependencies suck ass. Not on purpose, but because they're trying to be generic libraries. They have edge-cases and legacy baggage out the wazoo, bugs that will never be fixed for political reasons, and shit tons of code. If you just write it yourself, it's likely you can develop something higher-quality and better suited to your needs with 100x less code. No exaggeration on 100x.