logoalt Hacker News

LarsDu88 • last Wednesday at 8:46 PM • 5 replies • view on HN

Rust is the best language for LLMs b/c it gives by far the best debug messages. Just tons of verifiable reward signal for post-training. Even the most rudimentary LLMs can school me on idiomatic Rust


Replies

rafram • last Wednesday at 9:03 PM

On the other hand, Rust's borrow checker is very picky, and even a frontier LLM still sometimes struggles to respond to roadblocks sensibly (refactoring so whatever it's trying to do can be done safely) rather than stupidly (introducing some horrible global arena thing so it can make the borrow checker go away). A lot depends on how good your instructions are, and how good the existing code is, since bad input begets bad output.

➕ show 3 replies
iillexial • yesterday at 8:01 AM

in my experience LLMs write pretty bad Rust code. sure it works, strong typing system, etc., but it's unmaintainable and not readable.

➕ show 2 replies
bitexploder • last Wednesday at 8:58 PM

Evidence needed. I think for certain kinds of outcomes it has very strong advantages, but these advantages are not a given as 'best for LLMs' :)

throwitaway222 • last Wednesday at 10:39 PM

I've narrowed in on only using Go or Rust generated code (Go for APIs right now) and rust for some TUI or other thing. TS for web interfaces (w/React).

lossolo • last Wednesday at 9:54 PM

Not always. In my experience, if you're not working on a small, trivial codebase, LLMs will sometimes just create spaghetti unreadable, inefficient code to satisfy the constraints of the type system/borrow checker.