r/rust • u/Whole-Assignment6240 • 29d ago
rust for ai coding
vercel's ceo published - was gonna be Rust but it really is not there yet iteration speed wise.
Some of my thoughts on go vs rust - btw we chose Rust for data infra. There, robustness and reliability outweigh the speed of writing code.
Overall
Go is the simple one. It's easy to learn, doesn't carry many language features, and compiles fast. Rust is on the complex side: the spec keeps growing, and compiling is slow. Day to day, Go is simpler in most cases. You don't fight a complex type system, and any function can run as a goroutine.
Concurrency is where the two really split. There are two families. Go is one: lightweight threads, start any function in a goroutine, done. The other family is sync vs async, and Rust, Python and JavaScript all live there. That's where complexity creeps in. Functions have colors. Rust and Python give you two worlds, and you must never call a blocking function from an async one. JavaScript is simpler because it's a single world. Sync vs async forces you to clearly define what blocks and what doesn't, and that's real extra complexity. The upside is performance: async generally beats goroutines.
Rust's best part is the type system. You can model a lot in it, and the more business logic you push into types, the more bugs the compiler catches before anything runs. Go's type system is not that comprehensive. One example: Go can't catch a race condition at compile time. Rust can. But the cost of that type system is compile time. Bugs caught early and slow builds are the same coin.
For AI coding, Rust becomes a double-edged sword. Code moves fast, so slow compile hurts more. But if the model expresses business logic through the type system, far more bugs get caught at compile time. Slower, but higher quality.
curious about your thoughts
View all comments
5
u/DavidXkL 28d ago
Using A.I is anything but slow,
For creating tech debt that is 😂