zlacker

[parent] [thread] 1 comments
1. boustr+(OP)[view] [source] 2024-01-19 23:57:54
I think the biggest underlying difference is that Rust does not have a language runtime, whereas the other three you've listed do. Since the language runtime can preempt your code at any time, it becomes a lot easier to make async work - at the expense that now data races are easier to create.

I'm not going to pretend I'm an expert but would be happy if someone could expand further.

replies(1): >>hedgeh+Dg
2. hedgeh+Dg[view] [source] 2024-01-20 02:40:20
>>boustr+(OP)
In the early days of Rust there was a debate about whether to support "green threads" and in doing that require runtime support. It was actually implemented and included for a time but it creates problems when trying to do library or embedded code. At the time Go for example chose to go that route, and it was both nice (goroutines are nice to write and well supported) and expensive (effectively requires GC etc). I don't remember the details but there is a Rust RFC from when they removed green threads:

https://github.com/rust-lang/rfcs/blob/0806be4f282144cfcd55b...

[go to top]