This was a really good summary of what Rust feels like in my opinion. I’m still a beginner myself but I recognize what this article is saying very much.

The hacker news comments are as usual very good too:

https://news.ycombinator.com/item?id=40172033

  • porgamrer@programming.dev
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    6 months ago

    I greatly fear refactoring in Rust. Making a single conceptual change can require a huge number of code changes in practice, especially if it’s a change to ownership.

    Refactoring in languages like Java and C# is effortless in comparison, and not error prone at all in a modern codebase.

    You can use RC and clone everywhere, but now your code is unreadable, slow, and might even have memory leaks.

    You can use slotmaps everywhere, but now you’re embedding a different memory model with verbose syntax that doesn’t even have first-class references.

    I don’t even dislike Rust; I recently chose it for another project. I just think it has clear weaknesses and this is one of them.

    • arendjr@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      6 months ago

      I greatly fear refactoring in Rust. Making a single conceptual change can require a huge number of code changes in practice, especially if it’s a change to ownership.

      I think this is a fair criticism, but I think you and the poster you responded to are talking about different things. Usually when people use the term “fearless” in relation to Rust, it means the language provides a high level of confidence that what you’re delivering is free of mistakes. This certainly applies to refactoring too, where usually after you are done, and things compile again, you can be reasonably confident things work as before (assuming you didn’t make other changes the type system can’t catch for you).

      The kind of fear you are describing sounds more like a discouragement because of the amount of work ahead of you. That’s fair, because Rust does sometimes make things harder. I just think many Rust developers will disagree with you, not because you’re wrong, but because they may not feel the same type of discouragement, possibly because they’ve learned to appreciate the rewards more.