Can’t escape AI slop projects from meat proxies man. Every single open source project smells like Claude Code recently. Sad times.

  • SorteKanin@feddit.dk
    link
    fedilink
    arrow-up
    2
    ·
    8 hours ago

    but no language can take the place of C

    Why do you say that? I definitely think Rust can take the place of C. Not just can actually, I’d go as far as to say that Rust should take the place of C. C is much too unsafe to be used in today’s age. There’s really no excuse to use a memory unsafe language today if you’re starting something new.

    It would not have been better if it was written in C. Rust is just as fast and much better.

    • lapping6596@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      6 hours ago

      While my comment is about c++, not c, I did learn about one use case where rust is strictly worse than c++. Unbelievably low latency applications. Such as software that trades stocks. The way it’s implemented, is by sharing memory addresses across code intentionally having the same address written to and read from across threads. Something rust is sort of designed to not support.

      It’s the only use case I know of where that’s true.

      • SorteKanin@feddit.dk
        link
        fedilink
        arrow-up
        1
        ·
        6 hours ago

        I don’t know where you’ve heard this, but none of it is true. Rust is definitely used for low-latency trading, and that’s actually one place where it really shines.

        sharing memory addresses across code intentionally having the same address written to and read from across threads. Something rust is sort of designed to not support.

        C++ does not “support” that either. C++ will let you write that code, but if you write code like that in C++, it’s undefined behavior and trust me, no low-latency trading firm wants undefined behavior in their trading software (just imagine what could go wrong…).

        Rust helps you avoid such issues. However, Rust definitely “supports” undefined behavior in the exact same way. If you want to share mutable pointers across threads and you don’t give a crap about undefined behavior… I mean, that’s really, really stupid but you can just write unsafe and then you can do exactly what you can do in C++ as well.

    • anbu141@scribe.disroot.org
      link
      fedilink
      arrow-up
      1
      ·
      7 hours ago

      I actually like Rust too, and I’m not against it; however, C is currently the best-known programming language in the world. Still, I like your idea.

      • SorteKanin@feddit.dk
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        6 hours ago

        C is currently the best-known programming language in the world

        By what metric? It’s certainly not the most popular language. I don’t think it’s the most famous language either. Probably more people have heard of Python than C.

        • anbu141@scribe.disroot.org
          link
          fedilink
          arrow-up
          1
          arrow-down
          1
          ·
          5 hours ago

          Let me ask a question, then: why were the Linux kernel and the Linux ecosystem written in C rather than Python? No matter what other language you might consider, nothing can truly take the place of C; if you are a software developer, you should already know this.

          • SorteKanin@feddit.dk
            link
            fedilink
            arrow-up
            1
            ·
            3 hours ago

            Let me ask a question, then: why were the Linux kernel and the Linux ecosystem written in C rather than Python?

            … because C is a systems langauge that you can use to build a kernel? While Python is an interpreted runtime that cannot target bare-metal?

            Rust can easily take the place of C, as Rust can also target bare-metal. It can do everything that C can do (perhaps aside from compiling to some very esoteric platforms). The reason Linux is written in C is cause C was the best option at the time, not because C is some magical language that can do stuff that no other language can.

            Also, just because Linux was written in C doesn’t mean it is the best-known, most famous or most widely used language. Python is much more well-known and widely used than C.