News for hackers. Stuff that matters.
Re:Using Rust at a Startup: A Cautionary Tale by 3a2d29 on Wednesday November 23, 2022 @01:52AM (#33716016)
> borrow checker ensures that I don't leak memory when not using unsafe

Also to point out, you can 100% leak memory in safe rust

Re:Using Rust at a Startup: A Cautionary Tale by MrJohz on Wednesday November 23, 2022 @02:32AM (#33716253)
You can 100% leak memory in pretty much every language though: just use a bad caching/memoisation strategy, and you'll have memory leaks for days. Leaking memory isn't in of itself a problem, and it can be a very valid strategy for short-lived programs where you can rely on the OS to do the ultimate garbage collection run anyway. It's only a problem in the sense that uncontrolled memory acquisition will inevitably lead to the system running out of memory to acquire, but that's also true if you're accumulating memory for perfectly legitimate reasons.
Re:Using Rust at a Startup: A Cautionary Tale by satvikpendem on Wednesday November 23, 2022 @01:55AM (#33716035)
Yes, you're right. However, it's much harder than in other languages, and the likelihood of doing so therefore is lower. I can also leak memory in GC languages too, just to note.