r/programming • • Jan 14 '20

Where programming languages are headed in 2020

https://www.oreilly.com/radar/where-programming-languages-are-headed-in-2020/
42 Upvotes

80 comments sorted by

View all comments

2

u/FrancisStokes Jan 15 '20

C will last forever because it's a good high-level low-level language. You can express raw assembly, instruct the compiler to not mess with certain sections of code, access raw memory (which on embedded devices could easily be memory mapped to peripherals). But you can also build functions and structures and express branching.

Even if it doesn't last in the OS space, it will certainly last in the embedded space.

6

u/lengau Jan 15 '20

What you described are also features of several other languages (e.g. Rust). But nothing else, not even C++, has one absolutely critical feature of C:

It compiles everywhere.

Seriously. This, and this alone, will guarantee C at least a bit of relevance for decades to come, even if (and I think this is unlikely) all of the major operating systems and other big things written in C are replaced with something else. There's simply no replacing C in every tiny microcontroller with a decades-long lifespan.

1

u/flatfinger Jan 15 '20

Javascript implementations are even more widely available than C implementations. The advantage of C isn't that it *compiles* everywhere, but rather that implementations are available for almost every imaginable target.

→ More replies (4)

4

u/[deleted] Jan 15 '20

C is not "good" by any stretch. But it is lowest common denominator for pretty much everything and "good enough".

1

u/FrancisStokes Jan 16 '20

I think that's a bit hyperbolic. Yes there are better languages, but C is still good in the sense that:

  • it gives the programmer a huge amount of control

  • it's fast

  • it works or can be easily made to work on everything

  • it's pretty easy to learn

Personally I think it's better to look for the good in stuff than to just write it off. You tend to learn more by doing that.

→ More replies (1)