News for hackers. Stuff that matters.
Re:Migrating from Go to Rust by Certhas on Monday May 25, 2026 @02:09AM (#48263904)
It's the same logic for human and for AI code: In Rust the compiler catches many bugs so you don't have to.

If the LLM gives you safe code you know there are entire classes of things you don't have to review for.

That said, I agree with you. My experience is that LLMs are great if you are highly competent in the domain in which you let them work. And it's probably easier to be competent in Go than in Rust.

Re:Migrating from Go to Rust by bottlepalm on Monday May 25, 2026 @03:40AM (#48264405)
Safe? No compiler is going to catch badly designed code, or intentionally backdoored code. Memory leaks as well. Compilers are the ground floor of validation and the least of your problems with AI generated code.
Re:Migrating from Go to Rust by robocat on Monday May 25, 2026 @04:21AM (#48264621)
A mythical compiler might catch unsafe code
Re:Migrating from Go to Rust by Certhas on Monday May 25, 2026 @09:21AM (#48266527)
Yes? Does that contradict anything I said?
Re:Migrating from Go to Rust by antonvs on Wednesday May 27, 2026 @01:16AM (#48289966)
If the program design follows the principle of making illegal states unrepresentable (credit to Yaron Minsky), the compiler can catch much, much more than most people realize.

The process of designing a program like that itself catches a lot of "badly designed code". And such a design also naturally exposes many kinds of intentional backdoors, because security properties can quite easily be statically checked. For example, IDORs can be made literally impossible in such a design.

In discussions like this, I'm reminded of the William Gibson quote, "the future is already here, it's just unevenly distributed."

Re:Migrating from Go to Rust by cdud3 on Monday May 25, 2026 @05:23AM (#48264947)
I found it's the opposite. Thanks to LLM's whole classes of problems otherwise solved by using Rust are gone. It's now more important that the generated code is easy to read.
Re:Migrating from Go to Rust by afdbcreid on Monday May 25, 2026 @04:30PM (#48271322)
Relative to Go? I'm pretty sure your Go code won't be faster if you used LLMs. If you need that, Rust is still preferred.

Relative to C/C++? That'll be very interesting. Do you have some evidence that LLMs can create memory-safe code in C/C++? It'll be truly amazing if true, but given that they apparently struggle to create/maintain big codebases in already-memory-safe languages I seriously doubt it.

Re:Migrating from Go to Rust by cdud3 on Tuesday May 26, 2026 @02:53PM (#48284171)
Yes, generated C++ is memory-safe. Also there is much more C/C++ code out there LLM's got trained on showing in the quality.