this post was submitted on 25 Mar 2024
2 points (100.0% liked)

C Programming Language

1243 readers
1 users here now

Welcome to the C community!

C is quirky, flawed, and an enormous success.
... When I read commentary about suggestions for where C should go, I often think back and give thanks that it wasn't developed under the advice of a worldwide crowd.
... The only way to learn a new programming language is by writing programs in it.

© Dennis Ritchie

🌐 https://en.cppreference.com/w/c

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] suy@programming.dev 1 points 2 years ago

this has to do with writing ‘better’ code, which has proved impossible over and over again

I can't speak for C, as I don't follow it that much, but for C++, this is just not fair. It has been proven repeatedly that it can be done better, and much better. Each iteration has made so many things simpler, more productive, and also safer. Now, there are two problems with what I just said:

  • That it has been done safer, that doesn't mean that everyone makes good use of it.
  • That it has been done safer, doesn't mean that everything is fixable, and that it's on the same level of other, newer languages.

If that last part is what you mean, fine. But the way that you phrased (and that I quoted) is just not right.

At this point it’s literally easier to slowly port to a better language than it is to try and ‘fix’ C/C++.

Surely not for everything. Of course I see great value if I can stop depending on OpenSSL, and move to a better library written in a better language. Seriously looking forward for the day when I see dynamic libraries written in Rust in my package manager. But I'd like to see what's the plan for moving a large stack of C and C++ code, like a Linux distribution, to some "better language". I work everyday on such a stack (e.g. KDE Neon in my case, but applicable to any other typical distro with KDE or GNOME), and deploy to customers on such a stack (on Linux embedded like Yocto). Will the D-Bus daemon be written in Rust? Perhaps. Systemd? Maybe. NetworkManager, Udisks, etc.? Who knows. All the plethora of C and C++ applications that we use everyday? Doubtful.