You can build okay abstractions and then to maintain them you have a pinky-promise system so it doesn’t matter. You basically can’t build any abstraction in C because you can’t make a guarantee about… well… anything. Anyone at any point can just break your abstraction. And they will. At 100 lines of code maybe you can see that they don’t, but most projects are bit larger than that.
Even very basic abstractions possible in basically every language, like say a type that holds JSON text, is not possible in C.
You can build types around structures and access them via wrappers. This works perfectly fine for many abstractions. Sure, one can break those abstractions, but not accidentally, and this is true also in other languages.
Update: In fact, you can also build quite reliable abstractions around incomplete structure types. Those abstractions are better than what C++ adds, where the abstractions in the header are all very fragile.
This is very unreliable overall and since the type system is so primitive, you’re limited on what you can enforce on the structure. You can easily break stuff accidentally.
For example: suppose you need a container to hold ints. But it also needs to be able to hold other types. In C++ this is trivial, as in virtually all modern languages. In C this is impossible.
You can have a generic memory backed storage + accessors. But if you rely on void pointer functions, you have to remember every time to cast and pinky promise to only store one type. It’s very, very easy to make a mistake, and you will.
Most abstractions that we take for granted in modern languages are straight up not possible in C, or at least they are extremely incomplete. Part of that is because you can’t get C to do anything automatically. Every function call must be manual.
Polymorphic types are pretty basic as far as type systems go, and this isn't even polymorphism in the traditional sense. In C++ these are concrete parameterized types, types of types, via templates.
And yes I'm aware of intrusive objects using macros, I've done this myself before. And you can even do evil stuff, if you want, like make `[]` work with them. But it's not reliable and it most definitely is a hack. Macros are like templates but if you strip out all of the type awareness.
We could probably go back and forth all day, so I'll just leave it here. I don't think you can reliably make abstractions in C, even pretty primitive ones, due to it's weakly typed nature combined with a primitive type system. Other languages don't have both. Go has historically had a primitive type system, but it was at least fairly strongly typed. Most modern languages are both strongly typed and have an in-depth type system.
It's not that these things are 100% impossible in C. It's that the language will fight you, will make it as difficult as possible, and the compiler will not check anything. In C, it's pinky promises all the way down. That works on a small scale but falls apart very quickly IMO. It's not about syntax or niceties, it's about the type system and what it does, and does not, guarantee. C guarantees basically nothing so you can't trust anything, ever.
This isn't just annoying and bug prone, it's also not very performant. If you've ever programmed in PHP then you know the annoyance of constantly having to verify everything. It's expensive. That's why std::sort is fast, and C's qsort is dog slow. The lack of a real type system makes many simple problems very difficult to solve in a performant way.
Before you said "impossible", now you merely claim the language "fights" you. But I do not see how the language fights me, it is trivial and convenient for me to write abstractions in C, including polymorphic types. In fact, I find it far more enjoyable to write C than C++.
Those types can be written in a way that C's type system checks type safety, and my example was of this kind. No "pinky promises" necessary. In fact, these types are very similar to templates in C++. I would even agree that there are bad, but just in the same way templates in C++ are also bad.
And finally: you can also write a sort that inlines its comparator in C as well.
You can do anything you put your mind to, given that you're willing to ignore how brittle the result is and how easy it is to misuse.
For example, you cannot even write type-safe generic data structures in C. You just have to muck around with void pointers. You might reach for macros to make it "nicer" to use, or write "type-safe" functions that cast for you, but that's mostly a veneer.
Even very basic abstractions possible in basically every language, like say a type that holds JSON text, is not possible in C.