Second: I would suspect that there are far more new projects started today in C than there are in COBOL. C is in use (at least sometimes) as a voluntary choice, and COBOL is not.
I hear lots of interpretations of it. I could be misremembering. I'll take another look at it. Appreciate the specific points to look into. :)
"Second: I would suspect that there are far more new projects started today in C than there are in COBOL. C is in use (at least sometimes) as a voluntary choice, and COBOL is not."
If we're using that constraint, then Java and PHP are the example with Java for about any kind of app. A lot of people even like Java. They think it's great and hate C. So on and so forth. Yet, the popularity still tells me nothing as I got to watch Java get forced by Sun and others into its position step-by-step with insane amounts of work to get it to match performance and productivity of better-designed languages... partly successful there. It was actually experience of Java IIRC (later C#) that was the reason many people didn't think an OS could be done in a GC'd language. They mentally associated GC'd language with stuff like that. That a small team pulled it off in Oberon with a handful of people at a time porting or extending it is always news to Java developers I meet here.
Lack of context, bad design, meant to replace prior languages for most applications, platform orientation, and massive ecosystem + uptake + tooling make it a better comparison. So, I'll use it and COBOL next time.
Maybe anything that winds up trying to play in that "language for big corporate enterprise software" winds up like that?
What they have in common, as with C, is they were pulled or pushed in for ecosystem benefits + marketing then spread and sustained on that bases mostly. So much stuff written in them with so many talent or tools that they're self-perpetuating. I'm claiming most C adoption & entrenchment is the same phenomenon outside embedded or ultra-high-performance applications where use is quite practical. You constrained the COBOL example but I recalled popularity effect applied to Java, too.
I don't think anyone really likes COBOL. And I don't think anyone would start a new project in COBOL given the choice.
"I don't think anyone really likes COBOL."
COBOL was like the Visual Basic of mainframes. It looked close enough to pseudo-code or business problems that even lay people could learn to write mediocre code in it. They could Get Stuff Done. Versus assembly, ALGOL, or C, they'd prefer it since they can grok it. Truth is that those people probably don't need to be coding business-critical apps but that plus mainframes making compilers for it gave COBOL an adoption advantage. Much like relationship between cheap hardware, spread of UNIX, and C compiler availability.
Personally, I can't stand to look at COBOL. I tried to do my part ridding us of it by forwarding things like Semantic Designs Inc to COBOL shops where possible. Very entrenched, though, due to inertia of tons of software written in about a billion lines or so of it in shops where it's what most people know. Sound familiar?
But COBOL alternatives won. Where COBOL used to rule, Java rules now and .NET languages follow closely. People want to throw COBOL away but can't.
C alternatives just can't get past their niches. Even when people don't have to use C, they choose C. It's more than clear to me that this happens because people like C and actively work to keep it entrenched.
And liking C doesn't mean being unaware of its problems. But it means people want those problems fixed while keeping the core of what they like. I believe C alternatives fail because they go too far. They fix its shortcomings but also go for a different aesthetic.
So yes, my point is largely non-technical. However, our industry is full of examples of things that "won" for largely non-technical reasons.
A false argument that's easy to counter with itself:
COBOL is over 50 years old and still in widespread use by businesses, even though there have (supposedly) been better languages targeting the same use cases for decades now. There is more to it than just inertia.
Nope, it's just inertia. Specifically, the risk of breaking stuff by rewriting it to work better, preservation of backward compatibility as a business benefit, prior investments in tooling, what people are already using vs what's new, and laziness far as hobbyists that started with it. Same reasons C and UNIX problems didn't get fixed. Sociology and economics trump technical points in adoption or continuation of languages, platforms, etc. The meme for this, per Gabriel, is "Worse is Better."