top | item 32240615

(no title)

DenseComet | 3 years 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.

discuss

order

spullara|3 years ago

GCs rarely do something as expensive as Arc.

estebank|3 years ago

Barring a JIT, either they do or they have thread unsafety.