Talking of some code from 1987:
"Today I can compile and run the code by making only minor changes;
register i; is no longer a thing so that piece of nostalgia had to
go."
There's no need for register declarations to go to compile old code.
Implicit int has gone, but then a program from 1987 is likely to be
riddled with implicit int so you'd have to use a compiler that supports
pre-ANSI C anyway.
Anyway, details aside, I don't think there is anything curious about the
longevity of C. It was originally a reasonable solution to a particular
set of problems and it then hitched a ride on the success of Unix in
universities just as university courses in computing were starting out.
It got a second wind by being the right size of language (and already
designed) when the micro-processor boom occurred. The third wind came
with Linux. It's hard to see what other language could reasonably have
been chosen for Linux.
Very often it's social and economic forces (like the skills of your
potential workforce knows) that determine the destiny of computer
languages. C# does not exist because it's good, it exists because it's
not Java, and it's used because Microsoft promotes it. That does not
means it's bad (I have no idea) but the technical merits are very much
secondary.
The underlying stance of the article is that C is terrible so why is it
still around, but that simply misses the point. Internal combustion
engines are terrible, so why are /they/ still around? At every point in
their history they made sense, often for non-technical reasons.
Alternatives programming languages stand a better chance because they
don't require vastly expensive global infrastructure to support their
use but the basic point remains -- what were the socially and
economically viable alternatives for the core tasks that C was used for?
> Yup, that is when I started looking at C. I bought TurboC in 1987 ???
> and I was in love.
My K&R is inscribed '81, so I was still at university. C was not used
at that university so I must have had an eye on my future employment
even then. My first job did indeed use C.
--
Ben.