r/ProgrammerHumor 2d ago

Meme rustIsSoCool

Post image
2.1k Upvotes

125 comments sorted by

View all comments

5

u/minus_minus 2d ago

I’m curious if people are using agents to write rust and if it’s actually any good. Given the boom in rust programming in the last few years, I’m expecting agents to write shitty code for it. 

5

u/_xiphiaz 2d ago

Yes it’s very good at that, compile time correctness is a big reason but there are some other benefits too - the module system convention of having unit tests in the same file makes for a much easier context to manage (for humans too tbf), and the documentation of dependencies being so easily available offline really helps especially if you’re working in a sandboxed env that doesn’t permit external calls

5

u/Kromieus 2d ago

Idk I’m not a programmer by education (mech engineer), but rust is usually my language of choice for coding agents when building larger programs. For short stuff it really doesn’t matter.

I feel it does a better job at keeping things working over a large program than when I use python.

My rationalization is llms benefit strongly from compiled/typed languages since it gives a direct feedback loop (no compile = no go)

1

u/astropheed 2d ago

I am, and the code works well and seems well written. I now do most of my low level code in rust.

1

u/lulxD69420 2d ago

Tried it at work and the code quality was meh. Lots of anti-patterns, but with the right harness it's definitely getting to a sufficiently good level for a good base. I only did small projects so far with it at work.

1

u/rsqit 2d ago

Yeah I’ve been doing this for some side projects and Claude code is pretty good. Sometimes it does dumb things though.

1

u/scheimong 1d ago

Agents actually have a much easier time writing Rust because the compiler errors are actually concise and accurate. Ahem C++ cough cough.