logoalt Hacker News

satvikpendemyesterday at 11:22 PM1 replyview on HN

I wonder if we'd have eventually saw something like Nim, which has optional green thread concurrency and a garbage collector. Rust does not have these currently right? At least I haven't heard of them.


Replies

JoshTriplettyesterday at 11:52 PM

Some of Rust's async runtimes seem pretty similar to "optional green threads". There's no garbage collection; you can get something like a reference-counted GC by using Arc everywhere, but it's neither automatic nor universal.

Would we have gotten to "optional"? Maybe! But it's hard to predict the counterfactual, especially when substantial success usually has components of both design and luck/right-place-right-time. Rust hit a sweet spot, and it's not clear how a different history of Rust would have turned out.