Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Arc<Mutex<Box<T>>> is complex

This is not the language problem, but its simply the nature of the problem no? It is like saying, full adders are complex, can't we design something simpler? No, full adders are the way they are because addition in binary is complicated.

What you are saying is that this problem is not your kind of problem, which is fine. Not everyone needs to face the complexity of optimizing full adders. And so we created abstractions. The question is, how good is that abstraction?

C++ is like using FP math to do binary addition.



Probably if you use a lot of Arc<Mutex<Box<T>>> languages with proper runtime (like Go or Java) are gonna be more performant, in the end they are built with those abstractions in mind. So the question isn’t only how much the nature of the problem it is, but also how common the problem is, and is rust a correct way to solve this problem.


If you use a lot of Arc<Mutex<Box<T>>> you you probably just learn to use Rust properly and just use Arc<Mutex<T>> instead because it pretty much never makes sense to have a Box inside an Arc...

I say that as someone that thinks Rust's learning curve is the main reason it rarely makes economic sense to use it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: