Hacker News new | ask | show | jobs
by DenseComet 1425 days ago
> Each has its own performance hit but that hit can be worth it

Rust's focus on making things explicit has a tendency to make programmers want to remove every clone and allocation and make a mess of lifetimes and references in the process.

Just use Arc<Mutex<UserAccount>>. Clone freely. Box things. It makes programming so much easier, and performance will still match or exceed other languages. GC languages do the same things, but implicitly.

1 comments

GCs rarely do something as expensive as Arc.
Barring a JIT, either they do or they have thread unsafety.