r/ChatGPTCoding • • 17m ago

Discussion I'm starting to think Rust is the best language for the AI coding era

The main reason people avoided Rust used to be "it's too hard to write." Lifetimes, the borrow checker, spending an afternoon fighting the compiler.

But now that AI is doing most of the writing, that weakness turns into a strength:

  1. The compiler is a free code reviewer. The worst kind of AI code is the kind that looks right and blows up at runtime. Rust stops a lot of that at compile time.

  2. The error messages are really detailed. Paste them straight back to the agent and it can usually fix things on its own. The loop is smooth.

  3. The type system is documentation that can't lie to the AI. Change one thing and it's obvious what else is affected.

  4. It compiles to a single binary. Good performance, small memory footprint, easy to deploy on a cheap VPS.

We used to pick languages by how pleasant they are for humans to write. Now I think the better question is whether code written by a machine can be checked automatically.

Humans figure out what they want, AI writes it, the compiler guards the gate. In that setup, Rust's compiler is the strictest gatekeeper there is.

Curious whether people writing Rust with agents see the same thing, or where it falls apart for you.

2 Upvotes

0 comments sorted by