C Isn't A Programming Language Anymore

I just got around to reading this (thanks to it being brought up on fedi), and, wow, yeah.

1 Like

i’ve spent the last 3 hours of my life reading about C and Rust and ABIs and FFI

1 Like

It’s certainly frustrating – but it’s kind of cool that there is a de-facto common ground in C. You basically can write bindings for any language to your C interface, and you don’t even have to implement your library in C.

Though it is true that pure C programmers are a bit of a dying breed outside of kernel stuff; you might as well use C++ or Rust and have a lot more things preventing you from writing memory bugs.

It’s kinda cool, but even the notion of there being a common ground is, as demonstrated in the blog post and linked texts, highly questionable imo.

We should be defining ABIs in a rigid ABI description language, but for some reason there’s a lot of diehard C fans who readily label that an “impossible task” (despite it being rather trivial from a technical perspective).

And that’s where a lot of frustration with C comes from - it’s straightforward enough that it could’ve been a good lingua franca, but at the same time sloppy and undefined enough that it will always remain a fragile mess.

Yeah, I think when they talk about the painful nature of trying to simply parse headers getting complicated by the need for a full compiler because of macros and includes and such… ouch. That really makes interop more difficult and painful than it could be if everyone standardized on something purpose build for it.

The arguments around C being portable also hurting things is also very reasonable, parts of the spec adapting depending on the environment was a nice feature back in the day, but now and especially for interop it’s usually just a nightmare.

1 Like

Yeah, I think it’s a bit funny how we tend to look at C as a “low-level language close to the hardware” considering it was designed as a high-level one, basically the 1970s equivalent of Python.

1 Like