4 ms·
C's package management story is unfriendly to say the least. A header only library simplifies it dramatically, and makes it much more straightforward to integra
by colonCapitalDee 8mo ago
C's package management story is unfriendly to say the least. A header only library simplifies it dramatically, and makes it much more straightforward to integrate dependencies into your application.
- johnisgood 8mo agoUsing your OS' package manager IS C's package management. Is it really that difficult to use apt, pacman, or BSD's "pkg"?
- kreco 8mo agoWhat if I'm using 10 different OS? I can still push the file on git and it works everywhere else.
- johnisgood 8mo agogit is not a package manager. It does not handle many things a package manager does.
- whstl 8mo agoGP never said it was. But it does successfully replaces the need of using one, with less problems for certain situations.
- johnisgood 8mo agoYes, I do use git submodules as well sometimes. If you do not need the features of a package manager, then git submodules is great indeed.
- whstl 8mo agoThe reply was also not about submodules. “Push” makes it clear.
- deleted 8mo ago[deleted]
- deleted 8mo ago[deleted]
- johnisgood 8mo agoThat makes it even worse! If it is not submodules, then it is just copying a file into a repo with no version tracking against upstream, no update path, and no way to even know when there is a security fix. Package managers already use git where appropriate under the hood. Arch's PKGBUILD sources pull from git repos, FreeBSD's ports can fetch from git, Gentoo ebuilds support git-r3. The fetching is not the hard part. What a package manager gives you on top of that is dependency resolution, version constraints, conflict detection, reproducible builds, and clean removal. "git push" gives you none of that. And since I did not really address kreco's point properly: if the concern is cross-platform support across many OSes, tools like vcpkg and Conan exist specifically for this: cross-platform C/C++ dependency management with one workflow regardless of target. pkgsrc runs on 20+ platforms with the same build recipes. A header file in a git repo gives you none of that, it just gives you the illusion of portability until you hit a platform where it does not compile or links against the wrong thing. If your workflow does not need any of those features, then yeah, sure, but then you are not solving C's "package management problem", you are just ignoring it. In any case, the original comment called C's package management "unfriendly", and the counter-argument has somehow arrived at "just copy files into your repo and push". Comparing that to what a package manager does is absurd.
- whstl 8mo agoI don't think either me or GP compared this to a package manager. "Replacing usage" doesn't mean "it's the same".
- 8mo ago
- 1718627440 8mo agoThis. Wish I could upvote this 10 times.