by touilleMan · 6y ago · 0 comments
NodeJS has build it concurrency model on callbacks which make non-trivial application difficult to debug and evolve.
Since then new paradigms have emerged such as promises and structured concurrency (https://vorpus.org/blog/notes-on-structured-concurrency-or-g...).
Rust has build it concurrency model with those new paradigms in mind, mixing them with it awesome ownership model. In the end Rust brings to the table much stronger guarantees on your code consistency compared to NodeJS, which can save you a lot of time and energy on complex concurrent system ;-)
JavaScript has had async/await for four years (and promises for even longer than that).
JS has its issues but it's not at all helpful when criticism is badly outdated either.
Also, I'm not sure, but I think Scala had Futures before bluebirdjs existed, which was the defacto Promise for JS, AFAIK.
Bluebird wasn't the first JS Promise library. It became the defacto library because it was faster than everything else.
Edit: https://en.wikipedia.org/wiki/Futures_and_promises has a history