this post was submitted on 29 Jul 2026
21 points (100.0% liked)

C Programming Language

1323 readers
29 users here now

Welcome to the C community!

C is quirky, flawed, and an enormous success.
... When I read commentary about suggestions for where C should go, I often think back and give thanks that it wasn't developed under the advice of a worldwide crowd.
... The only way to learn a new programming language is by writing programs in it.

ยฉ Dennis Ritchie

๐ŸŒ https://en.cppreference.com/w/c

founded 3 years ago
MODERATORS
 

I have watched some developers giving advice about using C for general software development, i noticed that a not insignificant amount of them are strictly using C89, vaguely gesturing that more recent versions of C are less dependable, or more broken.

I would appreciate if anyone here can explain the specifics, as me not being a C developer (yet) and looking over the source code of some libraries which do heavily use modern C features, for example to have a defer-like macro (using attributes, or the 2 for statement trick), or generic data structures (using manual name mangling).

I understand these examples are strictly not how C is usually used, and are common in other more modern languages, which may turn some developers away from using these, my main question is "why exactly?".

I don't mind being given further reading about this, so if you have an article in mind, it too would be greatly appreciated.

note: in the title i referred to C23, but it could be anything post C89/C99 depending on the subject matter.

top 7 comments
sorted by: hot top controversial new old
[โ€“] KissYagni@programming.dev 8 points 18 hours ago

It works. You have hammers and nails. Then, someday, a dude come with the new Hammer23, with better ergonomical grip, colored high density 3 sided head, and so on. Yeah, cool, but I still have the same nails to nail, and my current hammer do the job perfectly. And I drilled a hole in my workbench ten year ago that have the perfect size for my current hammer.

[โ€“] BB_C@programming.dev 5 points 17 hours ago (1 children)

Later versions than C99 have no real added value proposition for the real use-cases where C is actually desired as an implementation language.

Later versions than C99 continue to introduce C++isms among other shit, from committee members some of whom probably never coded anything serious in C. This actually sometimes trickles down to compiler implementations even when you're sticking with an older version. So they manage to anger you even when you're keeping a distance.

Despite street myths and stereotypes, most people who choose C for some projects are not grey-hairs stuck in the past and incapable of learning new tools. Many of them in fact do use newer languages like Rust where they see fit. So there is no pressure to pick the one or two features from newer C versions that are maybe possibly can be useful.

Still, for some big projects that are kind of half-stuck with millions of lines of C, while at the same time having immense pressure to deliver maximum reliability AND security, these newer versions could proof useful at times. But the only project that comes to mind that fits this mold is the Linux kernel really. And there, non-standard language extensions are getting used anyway, so it's kind of an exceptional situation, that is also not very portable, but that's not a concern by the very nature of where a kernel sets in the stack.

That's very fair for the linux kernel, I'm aware that they use more modern features of C, though i have no idea to what extent.

It was part of the inspiration for asking this question to begin with.

[โ€“] refalo@programming.dev 1 points 15 hours ago (1 children)

The main reason I stick to it is that I target platforms that normally don't have anything else. Also the rules are easier to understand.

If you're willing to share, are you talking about embedded?

[โ€“] porous_grey_matter@lemmy.ml 2 points 20 hours ago (1 children)

They haven't bothered to update their knowledge about it. And why should they? They got gud with C89 and can write software that works with it. So since they don't know how to, when they use the modern stuff they break things; they haven't learnt the footguns yet. The same way a n00b would write broken software with any version of C. That feels bad so they reject it. It's like how everyone thinks the music from when they were a teenager is the best music. Starting learning from nothing it's probably better to learn the new stuff too, but if you're maintaining software written with one version it's probably not worth updating it and so you'll need to just work with what there is.

Although if you really need generics and other more advanced language features and you're starting a new project from scratch it might be better to go with something like rust at this point.

I don't know if I'd assume the same about them, as the way the argument was worded made it seem the new features aren't a positive, or are broken in some way, or at least gave the appearance of the actual reason being technical and not skill.

I was originally thinking of the use case for C is when you need to have something in a closed ecosystem, as in no dependencies, so generics made sense as an example, and while I'm aware one can use rust, it usually enables (and in a sense encourages) pulling in many dependencies, which is not always desirable.