
C: The Immortal Programming Language « Barr Code - cryo
https://embeddedgurus.com/barr-code/2018/02/c-the-immortal-programming-language/
======
ktpsns
Note that the chart shows results of survey questions asked to embedded system
programmers. They do not use the latest JavaScript shit. Java did not make it.
Probably Rust will not make it too.

I don't want to start a rant against C++, but I have seen C++ projects going
crazily complicated (note that C++ templating is turing complete and a very
different kind of language compared to C). That is, enthusiastic C++
programmers no more write C, they write in an obscure functional meta
programming language. In contrast, it seems to me that pure C is sometimes the
better choice when one wants to keep it comprehensible and future-proof (one
of the reasons why the Linux kernel is written in C and did not make the
transition to C++).

~~~
JoeAltmaier
I think that's stretching it. More like, Linus is an old crank and doesn't
want to learn new stuff.

C++ can be used simply to refactor lots of repetitive APIs into something
manageable. No need to go overboard. And no need to resist because 'it can go
badly wrong'. Just don't do that.

I've had to make changes to the Linux kernel. It was awful. Repetitive code,
the same names used for 4 or 5 different things, no design patterns, and on
and on.

~~~
ktpsns
I agree with the statement that C++ can be used to simplify. However, it can
also be used to make it more complex.

As an example, in the scientific community people rewrite Fortran and C codes
to C++. This is good in the first place because one can get maintainable,
readable and efficient code with high level templated libraries. However, once
you write something wrong, the compiler error output kills you (yes, one
should blame the compiler, not the language). As an effect, the next
generation can no more maintain the code and either goes back to good-old-
Fortran (or replace with "good-old-C" in the context of the Linux kernel).
Using fancy C++ idioms (sorry for when I call traits "fancy", but for
physicists it is) makes it sometimes (!) worse :-(

------
DannyB2
Maybe C simply has become a modern replacement for assembly language? (before
LLVM)

C is/was a target for some other compilers to emit simply because, prior to
LLVM, it was a sort of universal assembly language with a rich set of
implementations on any conceivable hardware.

In the 21st century, is C really being used as a higher level application
programming language? I doubt it. That is why so many languages exist at a
much higher level of abstraction. Yet C is great close to the hardware, like
micro controllers, operating systems, device drivers, codecs, other specialty
high performance libraries.

------
vardump
Using C guarantees future employment. Someone needs to keep fixing the
firmware until EOL.

(Embedded & device driver developer here).

------
cafard
They stab it with their (Guy L.) Steeley knives, but they just can't kill the
beast...

(Yes, I know this deserves downvotes: knock yourselves out.)

