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

Rust still needs to do a lot of catching up in HPC, HFT, GUI, game engines, console SDKs, OS drivers on Apple and Microsoft OSes, Arduino, LLVM and GCC,...

Rust threading is only safe between threads accessing data structures in process own memory. It does nothing for shared resources using OS IPC, or external resources shared among threads.

It will certainly improve, as hopefully C++ will, even it never gets 100% as safe as Rust, the ecosystem has too much weight for decades to come.



> Rust threading is only safe between threads accessing data structures in process own memory.

"Only". Intra-process shared memory is by far the most important kind of shared memory. 80% of the time you see someone advocating for message-passing multi-process over shared memory multi-thread concurrency or parallelism, it's because shared mutable memory is incredibly hard to get right in just about every mainstream language except for Rust.

> It does nothing for shared resources using OS IPC, or external resources shared among threads.

Only partially true. The very same language constructs which make shared memory safe can also be used to create safe wrappers for other shared resources.


Not in the age of microservices.

Language constructs only help if there are no other applications accessing the same resources.


> Not in the age of microservices.

There's a huge world outside of microservices.

> Language constructs only help if there are no other applications accessing the same resources.

You're mistaken. Rust's language constructs can often help you write safe wrappers around inter-process communication and synchronization mechanisms. Of course, all bets are off if the other processes don't adhere to the agreed-upon IPC protocol, but that's not the point. The point is that Rust makes it easier to not accidentally screw up the protocol yourself.


That is indeed the point, as most projects don't use a single language in isolation.


So now you're arguing that Rust won't help because it doesn't fix the deficiencies of other languages? So what? At least you'll have fewer defects in those parts that do use Rust.


I feel like this was true a few years ago but things have changed a lot recently.

In my opinion Bevy may be one of the better ECS implementations I've seen, as ex-gamedev it's just very well thought through. It's never going to supplant Unity or Unreal but that's less of a language issue than just the scope of those codebases.

You're seeing a lot more of it showing up in OSes across Android, Linux and I've seen a fair bit of movement in the windows space as well.

As for IPC, C/C++ doesn't help you their either, that's more of a framework level concern. If anything the threading model helps when you're doing concurrent IPC dispatch(ex: MTA COM or equivalent high throughput IPC) and preventing data races.




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

Search: