Hacker News new | ask | show | jobs
by jim33442 18 days ago
These articles keep coming up, and the author never actually tries agentic coding in Rust vs Python. You will probably find that the LLM does better with Python for kinda similar reasons as humans. It's succinct and can be rerun quickly while you iterate. There's also the difference in training data. If/when a human needs to review code or intervene, same applies.

Can't say I've tried Rust, but my AI tooling has always been noticeably worse at doing comparable tasks in C++ instead of Python. Not just toy examples but real systems in prod with testing, maintenance, oncall, feature rollouts, etc.

1 comments

> the author never actually tries agentic coding in Rust vs Python

> Can't say I've tried Rust

...

Well, I've actually tried both. The result is similar to what happens when humans code: for small programs the simplicity and terseness of Python helps, but in large programs that accumulate many more invariants that have to be upheld, strictness of Rust becomes an advantage, because it can catch subtler issues with ownership, lifetimes, thread safety.

Although ownership and lifetimes seem like a Rust-specific chore, they're used in APIs to represent all kinds of temporary and single-use objects, so ownership errors are often symptoms of logic bugs that would exist in C++ and even Python, like an event handler callback assuming the event will fire only once when it can fire n times.

You don't see as much improvement with C++, because C++ requires the programmer to get these things correctly, instead of correcting the programmer.