upvote
Rust has a very strict type system and an ecosystem that often utilizes the type system well.

Many things that would only be caught at runtime in other languages are caught at compile time in Rust, making coding agents iterate until things compile and work well.

Rust also has great error messages, which help the agents in fixing compilation errors.

reply
The compile errors are great. I can change one function signature and have my output fill up with compile errors (that would all be runtime errors in python). Then I just let claude cook on fixing them. Any time you have to run your program and tell claude what’s wrong with it you’re wasting time, but because claude can run the compiler itself and iterate it’s much more able to complete a task without intervention.
reply
I can't give you examples, but my experience is that AI does very well with Rust except for cases where a library has a constantly changing API/ has had recent breaking changes. I find that AI does extremely well at "picking up" a Rust codebase, I suspect due to the type information providing context but I couldn't say.
reply
I think relative to the typical Rust code it likely does worse than AI relative to the typical Python code. But due to the compiler, it's possible you might get more correctness out of AI-generated rust code on average.
reply
I think the argument is more that working rust code is better than working Python, and AI assistance makes it more tenable for average developers to successfully produce working rust code, and in particular is helpful for navigating the gap between "code written" and "code compiling" (eg why is the borrow checked mad at me).
reply
Even if it writes the same or even somewhat worse rust than python, assuming the output is the same you are likely to get a speedup + a better distribution story.
reply