How in the world to C people cope with the lack of generics or higher-order anything.

"There's 5 types, and they go from one type to another type. That's 5 x 5 combinations with no repetitions, guess I'm just gonna add that. Then there's 3 error handlers, so you need to do 5 x 5 x 3. And then there's a few sub-genres, so that's 3 x 3 x 3 to add on,"

Maybe this is why all the C interfaces are untyped and unsafe. Doing it any other way is basically like loading up a combinatoric shotgun and flipping it around to point at your own chest.

@thephd I have Opinions on this
@fay59 I would like to hear your Opinions, someday. (Whenever, really, you feel like Divulging them.)

@thephd
This is absolutely why all C interfaces are untyped and unverifiable. For an entirely separate rant to have some other time, at least for pointers to single objects (as opposed to pointers into arrays), that tends to not be terribly unsafe in practice, though.

There's a famous quote in French: "ce qui se conçoit bien s'énonce clairement, et les mots pour le dire viennent aisément" (roughly: "when you understand something clearly, putting it into words comes naturally"). The French hold their language in high esteem, so it's used as a way to say that if you don't have the words to describe something, you should work on your understanding of that thing. This quote is weirdly relevant to programming languages, because often people understand concepts clearly, but they don't have the words to explain them to a machine–because the words don't exist. This is a failing of the programming language, not a failing of their understanding!

@thephd C in particular is very guilty of not having the right words to express useful ideas. To most people who like C despite there being alternatives, the reason I've come across the most is that they like languages that have a small number of primitives. This is never how it's phrased to me, but the best way I can synthesize it is that they perceive that each project has a budget of "understanding points" and they want to spend as much of that budget on project-specific knowledge and as little as possible on language knowledge. (I think that it's a flawed vision of "understanding points" because language understanding carries over.)
@fay59 @thephd While I would say your description of "understanding points" is fairly accurate, I do not feel that C lacks words to express things. Quite the opposite: I find it far easier to express my ideas in C than in other languages. It may sometimes require more words in C than in other languages, because you have to work your way up from smaller low-level parts, but somehow that makes it easier for me than a high-level feature that then may not fit exactly to the idea I want to express.
@uecker @thephd what “our side” means when we say XYZ is easier to express in other languages is not always that it’s easier to write (although sometimes it is), but more that once you’ve written it, the mere fact that it builds is a proof that your program is free of many classes of mistakes.
@fay59 @thephd Not sure what "your side" is, but I am a bit confused. So by "easier to express" you mean "provable safe"? But this is does not seen to be the same thing and I would say a simple languages also helps makes things easier to prove. In terms how my own C code is structured, it would be relatively easy to prove certain properties. If you say a type system should make this explicit, I would agree and there languages that do this better than C (but certainly not C++).
@fay59 @thephd BTW: I am also a fan of higher-order type systems and I think we should add one to C! One with parametric polymorphism and dependent types! I think the result would be a language that is fast, small, and safe.