logoalt Hacker News

mr_00ff00yesterday at 3:49 PM4 repliesview on HN

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.


Replies

JoshTriplettyesterday at 5:08 PM

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.

show 1 reply
Barrin92yesterday at 7:18 PM

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?

bluGillyesterday at 3:58 PM

The other things I've seen beginners do is throw unsafe at everything.

show 2 replies
stefan_yesterday at 6:07 PM

Actually they just Arc<T> everything