Remix.run Logo
kazinator 6 hours ago

In the world of Kubernetes and languages where a one-liner brings in a graph of 1700 dependencies, and oceans of Yaml, it's suddently important for a C thing to be one file rather than two.

jasonpeacock 3 hours ago | parent | next [-]

C libraries have advertised "header-only" for a long time, it's because there is no package manager/dependency management so you're literally copying all your dependencies into your project.

This is also why everyone implements their own (buggy) linked-list implementations, etc.

And header-only is more efficient to include and build with than header+source.

uecker 3 hours ago | parent | next [-]

I never copied my dependencies into my C project, nor does it usually take more than a couple of seconds to add one.

AlotOfReading 44 minutes ago | parent [-]

There's a number of extremely shitty vendor toolchain/IDE combos out there that make adding and managing dependencies unnecessarily painful. Things like only allowing one project to be open at a time, or compiler flags needing to be manually copied to each target.

Now that I'm thinking about it, CMake also isn't particularly good at this the way most people use it.

3 hours ago | parent | prev [-]
[deleted]
fonheponho 3 hours ago | parent | prev | next [-]

Exactly; I can't understand this obsession with header-only C "libraries".

quotemstr 3 hours ago | parent | prev [-]

Writing new C code in 2026 is already an artisanal statement, so why not got all the way in making it?