• suy@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    1 year 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.