I feel like this is conflating concurrency with parallelism. Also, Rust's learning curve is just "moderate"? I like Rust as much as the next fanboy, but as compared to what?! Rust is downright famous for its comparatively glacial learning curve.
The flowcharts accurately show both JavaScript and Rust, but in an apples-and-oranges kind of way. The JS chart is for event handlers and non-blocking I/O, not threads. Threads in JS would be Workers (or WebWorkers in the browser context), which also boast lack of deadlocks and enforced thread safety out of the box.
On the flip side, the Rust chart shows multithreading, not event handling and non-blocking I/O as found with async/await.
If you want to compare the two (and the differences are quite interesting from a language philosophy POV), it's JS's event loop compared to Rust's async/await OR JS Workers compared to Rust multithreading.
1 comment
[ 2.9 ms ] story [ 6.1 ms ] threadThe flowcharts accurately show both JavaScript and Rust, but in an apples-and-oranges kind of way. The JS chart is for event handlers and non-blocking I/O, not threads. Threads in JS would be Workers (or WebWorkers in the browser context), which also boast lack of deadlocks and enforced thread safety out of the box.
On the flip side, the Rust chart shows multithreading, not event handling and non-blocking I/O as found with async/await.
If you want to compare the two (and the differences are quite interesting from a language philosophy POV), it's JS's event loop compared to Rust's async/await OR JS Workers compared to Rust multithreading.