Why is Rust difficult?
I like Rust so far, but there&#x27;s a few things I think aren&#x27;t true:<p>* That Rust is only harder because it enforces &#x27;correctness.&#x27; It certainly is harder because it enforces correctness, but it&#x27;s also harder because of <i>how</i>. I&#x27;m not saying there&#x27;s a better approach to this, but I think a lot of people are implying that there isn&#x27;t, and I don&#x27;t think that&#x27;s a safe assumption. I think that we could find ways to make equally memory-safe languages that go about enforcing safety in entirely different manners than with ownership and lifetime semantics.<p>* In fact, the entire idea that Rust enforces correctness. Only if your definition of &#x27;correctness&#x27; to be memory-safety, but I would normally define &#x27;correctness&#x27; to include rigorous mathematical proofs. Rust&#x27;s safety guarantees are often accidentally blown out of proportion; they mainly aid in preventing security and concurrency bugs, but only a certain class of each. This is still useful, but this caveat really needs to be in your face more often, as a lot of people will not mention it when touting the benefits of Rust, and beginners can get easily confused about what exactly Rust prevents you from doing.<p>* The idea that Rust&#x27;s approach is always worth the trade-offs. Go is another programming language I like, and there are definitely things that are simply easier to write in Go with few disadvantages. Fearless concurrency is a wonderful feature, but for embarrassingly parallel problems like, often, web servers, where each thread is usually independent in terms of mutable state, Go works wonderfully. It also lets you shoot yourself in the foot in a way that Rust wouldn&#x27;t, but often for a lot of simpler apps it still ends up being easier.<p>* The idea that solving the compiler errors makes you understand the problems correctly. For example, you could always just clone memory at every occasion, return the input instead of borrowing, etc. In fact, these things might be easier for a beginner to do. There will probably be a ton of Rust anti-patterns that come about from trying to resolve compiler errors.