News for hackers. Stuff that matters.
Re:Garbage collected smart pointers in Rust via concurrent c... by umanwizard on Friday December 13, 2024 @01:42PM (#42411135)
Your question is reasonable; I don't think you should have been downvoted.

That's indeed one of the major advantages of Rust but it's not the only reason people like the language. Just to give an example, you can write concurrent code without ever worrying that you accidentally failed to protect something with a mutex; whether some code is thread-safe or not is encoded in the type system and violating thread safety is a compiler error. This is a huge advantage that has little to do with lack of GC.

Re:Garbage collected smart pointers in Rust via concurrent c... by throwaway81523 on Friday December 13, 2024 @03:20PM (#42411995)
I wonder if there is an STM (software transactional memory) implementation that uses the borrow checker that way, similar to how Haskell's STM monad uses Haskell's type system to ensure nothing leaks.