IMHO: JavaScript won because it is single-threaded.
The regular JS dev will never need a mutex like we do on native. And that makes things so much easier for systems design.
IMHO: JavaScript won because it is single-threaded.
The regular JS dev will never need a mutex like we do on native. And that makes things so much easier for systems design.
Also explains why PHP proliferated.
Until it's time to do production level stuff, then the rust-compiler becomes a missed friend!!!!!!!!
Rust async is a disaster too.
Python was defacto single threaded too because of GIL
Dart is also single threaded
I don't know the context of your post, but of course mutex is useful in JS.
If you have an async function inside your function, you could need a mutex
Simple example is spend money, call this function 2 times in a short time and your user could spend money he doesn't have
async function spendMoney(amount) {
const balance = await getBalance()
if (balance > amount)
await spend(amount)
}
might want to check out elixir and erlang. the only well designed multi thread VM.