wes at page.ca
Wed Nov 2 17:49:56 UTC 2016
I'm still confused about what problem we are trying to solve here.
I had pthreads-style JS running in JS 1.7 many years ago (
https://github.com/wesgarland/gpsee/tree/master/modules/thread), and after
investing quite a lot of time in making it work, I found that it wasn't
really all that useful in solving any problems I had at the time. Or
since. Mostly it was written for problems I thought I had, because I was a
C developer trying to bend JS to fit old thought patterns.
Lately, I have been using messaging passing a la DOM workers when I need
parallelization and find it quite useful.
Incidentally, there is no "single thread dogma". I don't know where you
get this idea. Running multiple threads of unrelated JS is completely
supported by the existing spec and at least one of the engines.
Finally, Message Passing is not a JS problem either, IMO. It's a host
environment problem. This is why, for example, we have DOM workers and not
JS workers. If you want workers for some other (ie non-browser)
environment, just write it. It's not hard, and it doesn't need to be part
of the language.
On 2 November 2016 at 13:32, Florian Bösch <pyalot at gmail.com> wrote:
> On Wed, Nov 2, 2016 at 6:16 PM, Bradley Meck <bradley.meck at gmail.com>
>> I'm fine with co-routines, just explicit ones (which we currently have
>> via generators and async functions). Implicit ones make it hard to reason
>> about if a variable needs to place guards prior to performing any action if
>> actions pop the stack in order to do a co-routine pause/resume.
> As I've illustrated, the natural tendency of explicit tagged asynchronous
> code combined with proper software engineering (separation of concerns,
> modularity, reuse, interfaces, encapsulation etc.) will be to infect most
> code with it, until the distinction of "explicit" becomes entirely
> es-discuss mailing list
> es-discuss at mozilla.org
Wesley W. Garland
Director, Product Development
+1 613 542 2787 x 102
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss