HACKER Q&A
📣 tonyplee

Should LLM be able to translate C to rust as easy as English to Japanese


Tried that on Google's AI and gpt-oss with few models locally, the answers was not as good and I expect. Any idea on why? Not enough training materials over all?


  👤 PaulHoule Accepted Answer ✓
Translating a computer program you can be right or wrong. To write a Rust program that (1) compiles and (2) actually does the job you have to solve constraint problems exactly. If you are translating from English to Japanese you have a wide range of choices, people could argue a lot over whether or not a translation is good, practically one that is "95% correct" by one person's measure might be preferred over a "100% correct" one because people like the style better.

👤 rglover
Not necessarily. They're different programming paradigms and the LLM isn't thinking, it's just giving you what is most likely to be the correct translation. But unlike a written language, there's a ton of technical nuance that it has no real awareness of beyond the similarities between tokens.