3 ms·
I dont think JavaScript needs threads.
by 0xADADA 9y ago
I dont think JavaScript needs threads.
- ojosilva 9y agoI on the other hand think JS does need threads, but they should, to a certain extent, be automatically managed by the event loop and transparent to the programmer. That way you get more bandwidth (workers in fact) to process your internal JS event queue. Threads are great also when you need to do CPU intensive calculations such as processing an audio file or number crunching. That's what NapaJS seems to be geared towards in fact.
- cookiecaper 9y agoWe should be careful not to be too dismissive. In my opinion, dismissive attitudes have hurt Python considerably in the last 10 years. As people pushed the limits of Python's performance and were only met with answers like "use C for fast code, the GIL is probably never going to be removed", Go and Swift emerged, clearly intending to provide a Python-like development experience with performance characteristics more similar to Java, including the ability to run real threads. Other runtime developers should pay attention and be careful not to fall into the same trap.
- speedplane 9y ago> I dont think JavaScript needs threads. Seriously... when publishing a project like this, the authors ought to give a least a bit of insight into their motivation. Their examples include calculating Fibonocci in parallel, not exactly breakthrough.
- always_good 9y agoI know it's addicting to be dismissive, but: https://github.com/Microsoft/napajs/wiki/Why-Napa.js https://github.com/Microsoft/napajs/wiki/Why-Napa.js