r/programming • • Aug 05 '26

The rust programming language is adopting a new contributing policy

https://blog.rust-lang.org/inside-rust/2026/08/05/rust-langrust-is-adopting-an-llm-policy/
628 Upvotes

132 comments sorted by

View all comments

Show parent comment

9

u/remy_porter Aug 05 '26

I’ve found it’s most useful to have the LLM query the code and not generate new code. Writing code is easy. Understanding a large codebase is hard. And it gets harder the more slop code there is in there.

48

u/pjank85 Aug 05 '26

This works until LLM starts to gaslight you into believing something that is not true. I was reviewing a PR once and it came up with a theory that this is not a proper fix. I spent the whole day following its logic only to discover it was a proper fix after all and the thing it proposed was a giant convoluted race condition. Whole day wasted and a terrible feeling.

17

u/Raknarg Aug 05 '26

yes your first instinct has to be to mistrust whatever it tells you

28

u/pjank85 Aug 05 '26

It is my first instinct to mistrust it and always verify. For complex system this verification sometimes takes considerable time and effort. Being led astray by a professionally souding response and spending 7h to confirm it is wrong is a shitty feeling.

7

u/Raknarg Aug 05 '26

thats brutal. definitely been burned similarly before, not for that long though

3

u/Hacnar Aug 06 '26

That happens with humans too. For me the important question is whether it happens more often with LLMs than with humans. If not, then I see responsible LLM usage as a net win.

10

u/pjank85 Aug 06 '26

When it happens with humans these humans have to spend a similar amount of time doing such analysis so they don't have the ability to flood you with these. Over 15 years of programming career I have probably seen 4 cases where debunking a false assumption took over 2h. During the last year I have seen 3 with LLMs. The more important bit is when you do it with humans you pair, discuss and you both learn so everyone involved has a better understanding at the end. While not impossible it is very hard to do it with LLMs.

2

u/Hacnar Aug 06 '26

It used to be as you described. But the experience changes year by year. While not revolutionary, the improvements in LLM are still noticeable. That's why I expect that by the time LLM capabilities plateau, their only sgnificant drawback will be their cost.

4

u/pjank85 Aug 06 '26

Unless they are somehow perfect (which I doubt would ever happen unless we go into sci-fi self improving AGI) the problem isn't their capability but the difficulty of these systems to learn. Sure you can make some md files in your repo as "memory" but this is very limited as it eats away at LLMs context limits. When context gets compressed real wild hallucinations start. So the more the system "learns" the more prone to hallucinations it becomes. This is only a problem on large complex code bases. And you need to review the "memory" heavily by hand because if something can be generated by an LLM it can be generated on the fly based on the code and is therefore - by definition - totally useless.

1

u/Hacnar Aug 08 '26

That's the status today. We've seen that additional tooling around LLMs can improve the results. While the complexity vs context window equation will probably still hold, I believe that the levels of complexity LLMs will handle before crumbling will get bigger than you think.

6

u/Bekwnn Aug 05 '26 edited Aug 05 '26

My favorite was a hallucination about a visual studio feature that was tentatively accepted over a year ago and never implemented for pragma push/pop calling conventions.

Chat bot wasted a bunch of my time trying to insist it was real.

At the time I ran into the problem, this comment:

Apr 18, 2026 12:44 PM
Community input: any news on that feature request?

Hadn't been made yet, so I was stuck wondering if this accepted feature proposal was actually never implemented.

7

u/drakythe Aug 05 '26

My boss asked me to review some documentation he had Claude throw together about a new infrastructure stack we want to implement. The documentation included a note that we needed to decide on where code would be hosted since Code Commit was deprecated and I had to remind my boss that AWS un-deprecated it in December and that whole section of planning was void. Stop wasting time. (To be clear, a human can make that mistake too. But it takes 20 seconds to verify and it was a non-trivial part of the system since everything else was in AWS)

3

u/remy_porter Aug 05 '26

Well sure, that’s why I read the code. I’m mostly asking for things like “where in the code does this happen”. It’s frequently wrong.

1

u/SnooFoxes782 Aug 08 '26

Sounds like the logic was sound enough that you found it worthwhile to verify if it was a bug or not?

1

u/pjank85 Aug 08 '26

The gaslighting was in a form: this is not a proper fix because there are edge cases not handled correctly and you need to to this instead - followed by a diff/patch of the things it proposed. It was specific enough and on a high enough level not to be caught by unit tests - but it was a race condition. I only found out after a long verification session. The original fix was perfectly fine - it was all a hallucination but a scary sounding one. The original fix was deployed and it worked as expected. The LLM output was wrong but it made it sound like it was a safer and more complete solution - it was not.

→ More replies (2)

10

u/hoodieweather- Aug 05 '26

I thought this a year or so back, but honestly, these days, with proper guidance I'm getting LLMs to produce code that's pretty close to what I would have written by hand. I definitely don't see us reaching the point of "just give it a vague issue to fix and let it ship when done" any time soon, but if you have the bot use practices like TDD and self review, coupled with well-scoped specs for implementation, you can easily cut your time to a PR in half and still end up with a solid change set.

I'm doing this at work with a near decade-old codebase, and as long as I put it on the proper rails, I'm honestly (and surprisingly) impressed with the results. The real question I have is, at what point does the current subsidized pricing model fall apart and this becomes unsustainable.

13

u/ComplianceAuditor Aug 05 '26

Pretty soon. It will switch to entirely usage based billing and it will get super expensive across the board.

6

u/hoodieweather- Aug 05 '26

Agreed, this has been my bigger concern, along with figuring out at what point the time savings (if any) are no longer worth the cost.

3

u/21Rollie Aug 07 '26

My company already crossed their budget and restricted us. But I mean, they told us to go wild….

4

u/ComplianceAuditor Aug 08 '26

Send them an email saying that you are blocked from going wild and want clarification if they still want you to go wild.

12

u/remy_porter Aug 05 '26

Ive gotten it to generate good code for stuff I don’t want to keep. Disposable code. None of the output I’ve gotten is anything I’d consider production ready. It remains unable to write anything truly modular.

And since a) reading code is harder than writing code, and b) I’m going to read all the AI generated code, it’s just more work overall.

6

u/hoodieweather- Aug 05 '26

Have you experimented much with how you prompt things, or using the various agent modes/skills like Claude's planning or the Superpowers skill set?

I fully believe that it hasn't produced anything production-ready for you, I'm not discounting that, I'm just curious because I have gotten code that I was comfortable shipping. Fully tested, fits the existing architecture of the codebase, handles edge cases and is easy to read and maintain.

I also primarily work with web tech, though, which I imagine it has by and large the best training for. I've found that when I need to dig into something like C++, it's a lot more hit or miss.

Edit: I also fully agree with your points about reading code, it's very difficult for me to just "trust" the LLM output. I've been trying to find reliable ways to do that (only reviewing tests, having verification points in the loop, etc.) but the reality is that LLMs, by nature, cannot be reliable, so it's tough.

5

u/remy_porter Aug 05 '26

I’ve dabbled. I think it’s very good at implementing features, but I’m of the mind that a good program is a domain specific language living atop the syntax of your implementation languages. So while it’s not bad at churning out a feature, I’ve never gotten it to build a vocabulary I’d want to use to extend the software.

0

u/hoodieweather- Aug 05 '26

I have definitely had to give it specific naming conventions and terms to use, because it'll pick things that just aren't clear or are too cute and clever.

Fortunately I've also had decent results with correcting it and having it apply the new guidance well, but that does also mean you have to have a good understanding of what it's actually producing, which goes back to the issue of needing to thoroughly read the code.

6

u/remy_porter Aug 05 '26

Naming conventions nothing. I’m talking the way it composes modules and passes data between subsystems. It tends to generate a lot of very large functions and classes with no real sense of composability outside of the feature being implemented right now.

→ More replies (4)