Comment by kragen

6 years ago

JS is designed in part based on lessons learned from the mistakes of past languages.

Scheme doesn't have coroutines as such; it has first-class continuations.

You can definitely implement cooperative threading in a compiler whose target language doesn't have any kind of threads. You know the 386, SPARC, and PDP-11 don't have threading? It's all simulated. (Wasm probably will have first-class shared-memory threads though. It's being trialed in Chrome already.)

>You can definitely implement cooperative threading in a compiler whose target language doesn't have any kind of threads

I can’t find that thread in my comment history, but there was a wasm guy who basically said nope, not gonna have it, loud and clear, exactly in the context you noted. If that was not true, and all browser vendors will allow it, good.