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.

Reply to this note

Please Login to reply.

Discussion

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.

JavaScript won because it builds up on an incredible runtime and environment that handles system level interactions (including mutexes). Browsers are astonishing pieces of software

This.

Agree. But if it exposed the inner layers to the devs, it would have never become this big.

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.

asking out of stupidity, is there a way to put the compilers in multiple op_return transactions?, sometimes stupid questions enlighten people 😂✌️

sure, it'll just be very, very expensive ;)

thank you sir 😊🤝