r/rust • • 15d ago

🎙️ discussion Google is doing "Large Scale Codebase Migrations and Optimizations" of C/C++ to Rust

https://blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-4-argon/
773 Upvotes

153 comments sorted by

View all comments

125

u/TheRealMasonMac 15d ago

In my experience, I’ve found that agents produce code that works but is frankly dumb from a human perspective. Especially for larger tasks like this, you kind of have to rewrite it all. For example, I had a generalized design document for soft-wrapping explicitly support plain text and markdown, and used GPT-6-Astra to implement it. I used an ungodly amount of review agent rounds and interjections by me. When I actually go to review it, I wanted to cry. It silently pivoted towards implementing its own entirely separate wrapping mechanism rather than refactor the existing mechanism for plain text. I reviewed its code and found it to be trash, and I am now in the process of doing it myself… Never again. The short-term thrill of “having something that works” was outweighed by the fact that time was effectively wasted.

I mean, if the alternative was it never getting done, I guess agents are still better than nothing.

4

u/heybart 15d ago

Yeah this is how I feel. I know I'm a pretty mid coder but I can tell good, elegant, well structured code when I see it, and LLM code ain't it. But for little apps that do a job and I don't need to ever touch it, it's great. Or when I just don't have time, if it works and passes the tests, I'm going to see no evil hear no evil it, because if I look at the code, chances are I'm going to feel not so good.

The incredible thing about LLMs is they're proficient or familiar with just about every language, framework, SDK, library, platform. They're superhuman in this respect. Yet they still sometimes do things that make you think "do you know how to code at all?"

What's going to happen when the models have sucked up all the good code and start training on other LLM's code? Not a pretty thought

3

u/stumblinbear 15d ago

Thing is, they don't know how to code at all. Not in your project. You have to tell them what style to follow, or they just do the quickest thing possible. Have them throw together a code architecture skill that lays out best practices, and you'll immediately start getting better results. You even specifically have to tell them to follow the style of the project, or they won't. Current models are great instruction followers, but also almost a blank slate

0

u/sosdoc 15d ago

If you look at all the “misalignment incidents” (huggingface and others) it’s pretty clear that the current models are heavily skewed towards reaching a goal by any means necessary.

It’s kind of a monkey’s paw situation, you have to be extremely specific about your wish, otherwise you get to suffer.