Open aleclarson opened 6 years ago
Ghost has reached a point where it would have to be compiled to Wasm which is starting to have support for threads now https://developers.google.com/web/updates/2018/10/wasm-threads
I'm not sure what's needed for syntax other than potentially a syntax for moving/copying values into closures to be spawned as a thread
This looks a lot like a language I have been working on. Have you consider alternative concurrency models such as Actors or CSP?
Actors, CSP, etc are things you would implement on top of threads. I think they would be more in the stdlib.
Thoughts on cooperative threading vs preemptive threading?
I don't think that needs to be true. CSP, Actors, and threads are all independent concurrency paradigms. All of them can be implemented completely independently and without any other, and each can be implemented on top of any other.
It might be cool if there was syntax sugar for "threads" (the definition of which depends on the target platform). For example, threads would compile to web workers for a browser target.