News for hackers. Stuff that matters.
Re:Rust Is Tier-1 Language at Microsoft by isolay on Thursday September 10, 2026 @11:46AM (#49645728)
Whether vibecoded Rust will be better than whatever they are doing now remains to be seen.
Re:Rust Is Tier-1 Language at Microsoft by mr_00ff00 on Thursday September 10, 2026 @11:49AM (#49645784)
The question in terms of memory is, will vibe coded rust get around ownership issues by .clone()-ing everything.

Maybe this has changed since I wrote Rust, but that was a classic beginner fix. Just throw memory at it.

Re:Rust Is Tier-1 Language at Microsoft by bluGill on Thursday September 10, 2026 @11:58AM (#49645924)
The other things I've seen beginners do is throw unsafe at everything.
Re:Rust Is Tier-1 Language at Microsoft by tredre3 on Thursday September 10, 2026 @12:33PM (#49646509)
The things that unsafe enables are arbitrary pointers, FFI, and accessing union members in a C struct. It seems highly unlikely to me that unsafe would fix any beginner's problem.

.clone() on the other hand is indeed an easy/quick fix for a lot of issues you'd face when learning rust.

Re:Rust Is Tier-1 Language at Microsoft by suddenlybananas on Thursday September 10, 2026 @12:41PM (#49646618)
I think beginner programmers are unlikely to use unsafe when learning rust but people coming from c or c++ who are beginners at rust might use unsafe all over the place.
Re:Rust Is Tier-1 Language at Microsoft by bluGill on Thursday September 10, 2026 @12:43PM (#49646658)
Exactly - we have been using C or C++ for decades and most of us have a lot of experience. We think like programmers in the languages meaning we often do things that Rust won't allow without unsafe. A small percent of the time that is the right thing (which is why Rust have unsafe), but very often there is a Rust way that is just as performant if only we knew how to think like Rust programmers.
Re:Rust Is Tier-1 Language at Microsoft by Pannoniae on Thursday September 10, 2026 @01:00PM (#49646912)
Sadly it still feels like it's one of the languages where the language doesn't trust you, it tries to force you to do things "the right way". I do love quite a few of its design like how traits are, not forcing every method into the declaration, and the standard library is much less crazy than the C++ version.

Sadly, other things a bit less so - the story for the thin battery-less stdlib + npm-style churn encourages bloat, and the semantics are obsessed with safety at a heavy cost to productivity unless you spam clone() and reference-counting - but then your program becomes slow, kind of negating the advantages, you might as well have written it in C# or something...

Re:Rust Is Tier-1 Language at Microsoft by rblatz on Thursday September 10, 2026 @02:13PM (#49648042)
Yeah it doesn’t trust you, and for good reason the decades of developers making the same mistakes over and over again. If everyone was perfect you wouldn’t need Rust, but no one is perfect and that’s why Rust exists.
Re:Rust Is Tier-1 Language at Microsoft by bluGill on Thursday September 10, 2026 @02:51PM (#49648569)
Most of the time the rust way is just as good, just different.
Re:Rust Is Tier-1 Language at Microsoft by uecker on Thursday September 10, 2026 @01:09PM (#49647060)
Yes, but this this is not a problem at all because any bug caused by misuse of unsafe (or unwrap) is entirely the fault of the programmer (or the AI) and not of Rust. /s
Re:Rust Is Tier-1 Language at Microsoft by JoshTriplett on Thursday September 10, 2026 @01:08PM (#49647045)
https://github.com/luser/keep-calm-and-call-clone

"Keep calm and call clone" is a good strategy for getting things working. Don't prematurely optimize code until you know it's the bottleneck.

Re:Rust Is Tier-1 Language at Microsoft by ben-schaaf on Thursday September 10, 2026 @02:23PM (#49648171)
There's premature optimisation, where you write a whole bunch of complicated code to avoid cloning an Arc<>. And then there's "premature optimisation" where you skip any consideration for performance until it becomes a problem.

The latter is usually what people who use the quote "premature optimisation is the root of all evil" think it means. Don't just keep calm and clone, consider what you're cloning and why, and then hopefully we won't end up with even more horribly slow software.

Re:Rust Is Tier-1 Language at Microsoft by bananamogul on Thursday September 10, 2026 @03:39PM (#49649163)
Isn’t the latter what Knuth meant?

Such a slippery slope between “consideration of performance” and optimization.

Re:Rust Is Tier-1 Language at Microsoft by cogman10 on Thursday September 10, 2026 @04:22PM (#49649681)
The full quote

> Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.

Notice the aspects and the reasons for knuth's "premature optimization". Is it making the code harder to debug and read? Is it a non-critical path?

If an optimization doesn't impact readability or debugability (for example, picking a datastructure that fits the problem instead of just using a List for everything). Then you should do it.

I see the quote so often pulled by people that want to justify inserting a n^2 algorithm when a log(n) solution is either the same amount of code or 1 line extra.

There's also important context about the era knuth was programming in. Optimization in the era of knuth was targeting the hardware and tickling things like the CPU cache and memory in a very specific way. It was things like clever bit manipulation and packing to save memory. That's the context. In modern terms it'd be "don't use SIMD intrinsics until you know you need them". It wouldn't be "Don't think about algorithmic complexity" which is where I most often see that kludge deployed.

Re:Rust Is Tier-1 Language at Microsoft by afdbcreid on Thursday September 10, 2026 @02:46PM (#49648497)
"Keep calm and clone" is a good advice for beginners. Then it is also a good advice for experts - because when you're an expert and you just think of cloning, that probably means it is easier than borrowing which you would default to.
Re:Rust Is Tier-1 Language at Microsoft by JoshTriplett on Thursday September 10, 2026 @03:18PM (#49648947)
By all means use borrowing if it's straightforward. But don't necessarily upend your whole codebase to avoid one clone, either.
Re:Rust Is Tier-1 Language at Microsoft by stefan_ on Thursday September 10, 2026 @02:07PM (#49647969)
Actually they just Arc<T> everything
Re:Rust Is Tier-1 Language at Microsoft by Barrin92 on Thursday September 10, 2026 @03:18PM (#49648934)
The question to me in terms of memory is, if you're writing a weather app on windows why are you not using C#.

The point of these low/zero overhead languages like Rust is you're in an environment where memory management is ultra critical. The dotnet garbage collector does more than a good enough job for a weather app, likely a much better one than vibe coded .clone() Rust

Instead of oscillating between Rust and 1 GB webview apps just ... use the excellent managed language that exists on the operating system appropriate for GUI applications?

Re:Rust Is Tier-1 Language at Microsoft by isolay on Friday September 11, 2026 @02:34AM (#49654290)
Maybe they fired all their experienced developers and only have cheap vibecoders now, I don’t know. The decisions of beancounters and lawyers that control these companies are mysterious to me.
Re:Rust Is Tier-1 Language at Microsoft by tcfhgj on Friday September 11, 2026 @06:33AM (#49656124)
Now that WinUI has a Rust API, I think using Rust is a no-brainer.

The app will be running on probably about a billion of devices, and Rust will reduce the footprint on each of those - assuming not a vibe coded clone app.

The additional effort isn't that big, and it would make the experience of maaaany users a bit better still.

Now extrapolate on all windows included apps and ui elements.

How much would that cost per license?

Re:Rust Is Tier-1 Language at Microsoft by hirvi74 on Thursday September 10, 2026 @01:40PM (#49647542)
I seriously do not think things could be any worse.
Re:Rust Is Tier-1 Language at Microsoft by dismalaf on Thursday September 10, 2026 @02:19PM (#49648131)
Instead of leaking memory it'll just clone the whole heap over and over.
Re:Rust Is Tier-1 Language at Microsoft by CamperBob2 on Thursday September 10, 2026 @02:30PM (#49648268)
If it's vibecoded, who GAF what language is used?

This argument applies regardless of how you feel about vibecoding. Lately people have been asking for x64 machine language and getting reasonable results.