\

Ask HN: Are Rust migrations delivering any benefits?

4 points - yesterday at 5:55 PM


There seems to be a growing trend of rewriting everything to Rust. The common argument seems to be surrounding safety and better concurrency.

I wanted to understand if I am the only one that finds the language hard to understand (primarily it's time system). Am I missing out on something that everyone including junior engineers seems to have figured out.

  • jdw64

    today at 10:48 AM

    A lot of people choose Rust because of UB and memory safety, but honestly, the language structure itself doesn't have great DX. And compared to other languages, there's a lot more you need to know.

    With C or C++, implementing a simple tree structure is straightforward, but in Rust, even writing a linked list is painful. The ecosystem is also fragmented. Most people use Tokio, and while AI can solve a lot of problems, AI often generates bad code just to work around the Borrow Checker.

    That said, the UX experience is goodβ€”but the developer experience is terrible, and there's so much to learn. Things that would just work in other languages require explicit handling in Rust. A lot of people like Rust's technical purity, but I don't like it because of the terrible experience that comes with it.

    That said, if I had to rewrite a large project from scratch, I think I would choose Rust. The benefits are that big.

    Personally, I think it has both pros and cons

    • dabinat

      yesterday at 6:09 PM

      It can be difficult to separate the benefits of rewriting in Rust with the benefits of rewriting in general. But you can get the most benefit by structuring your code in a way that forces its correctness to be validated at compile-time, where possible. You can limit a lot of bugs and programmer mistakes this way, as well as better reason about the code.

      But ultimately you can use any language you want and you don’t need to do anything just because other people are doing it. Do what makes sense for your project.

        • grandimam

          yesterday at 6:31 PM

          > But you can get the most benefit by structuring your code in a way that forces its correctness to be validated at compile-time

          Can you elaborate this more?

      • bjourne

        yesterday at 6:47 PM

        First you need to understand why C is a deeply flawed language. Google is your friend.