Comment by speedgoose

Comment by speedgoose 2 days ago

29 replies

I am not convinced that anyone would take a working rust project and rewrite it in C. I don’t see any good reason to do so.

When rust will lose popularity, it is going to happen eventually, I would bet it’s in favour of a newer and more promising programming language. Not C.

VBprogrammer 2 days ago

I think Rust has hit critical mass. It's now basically the default choice for something you want to perform well but want to be reasonably secure. For example, uv in the python ecosystem.

  • foldr 2 days ago

    If you read HN you might get that impression, but that vast majority of software that needs security and good performance is being written in Java.

    • dana321 2 days ago

      If you were building a programming language, would you write it in Java or Rust?

      • pjmlp 15 hours ago

        In those two alone, Java.

        There is no reason I would care about borrow checking implementing a compiler, and besides all the tooling, Java also has stuff like ANTRLR and MPS, and naturally Graal is a good playground for compiler backend tooling.

        However in general, I would rather look into OCaml, Haskell, F#, Scala.

      • childintime a day ago

        Graal and Truffle make the JVM look attractive, especially for this case!

      • foldr 2 days ago

        I'm not personally a fan of Java, but if I was implementing a compiler, I'd pick a language with GC. There's pretty much no downside to a GC in that context, and it gives you more flexibility when working with graph data structures.

        If 'building a programming language' means writing an interpreter or VM, then I can see the attraction of Rust for that case. But writing interpreters and VMs is like 0.0001% of the programming that gets done in the world.

    • pjmlp 15 hours ago

      Alongside C# in more Microsoft influenced culture shops. :)

    • VBprogrammer a day ago

      I wouldn't be surprised if that was closer to the truth. A heck of a lot of boring software runs on the JVM. That said, it's a slightly different niche from command line tools.

  • m00dy 2 days ago

    Rust is the clear winner of the LLM era. With code generation being so effortless, why would you write in any other language?

    • pjmlp 15 hours ago

      The ultimate goal is for LLM replace languages, and directly perform tasks, why bother with Rust when we will be using agentic runtimes?

      • m00dy 13 hours ago

        I feel so safe when my Rust code compiles; it feels like the program will run forever. I'm not sure what you mean by "agentic runtimes," but if they offer the same safety standards as Rust, I wouldn't mind using them.

    • throawayonthe 2 days ago

      i don't use LLMs, but i've heard people complain current LLMs are not good at writing Rust

      • m00dy 2 days ago

        yeah that narrative was popular last year. You can't go wrong with LLMs on Rust.

nacozarina 2 days ago

new chips will always have a c compiler available long before anything else

  • Avamander 2 days ago

    I would assume that an LLVM backend is created for new chips and then C is not the only thing getting support. There's very little point in just supporting C in that sense.

  • pjmlp 15 hours ago

    Alongside a much safer C++ compiler.

    In 2025 there are hardly single language compiler toolchains being released.

    Also if the chip toolchain is based on a GCC or clang fork, there are several frontends to chose from.

  • nicoburns 2 days ago

    That doesn't seem to have been an issue for recent new CPU architectures. RISC-V has excellent Rust support for example.

    • camel-cdr 2 days ago

      Not really. Rust still doesn't support Arm SVE or RVV intrinsics.

      • nicoburns a day ago

        I suppose so. I'd see that as more of a missing Rust language feature (SIMD support is still immature) rather than a platform support issue though.

      • pjmlp 15 hours ago

        Neither does C, the regular ISO C as defined by WG14.

ghthor 2 days ago

Compile speed maybe the only one. But hopefully that keeps becoming less of a difference