4 ms·
I think the main takeaway is: Writing code for asm.js/webassembly is not easy, and there might be a serious porting effort from existing C++ code. But I think t
by Matthias247 11y ago
I think the main takeaway is: Writing code for asm.js/webassembly is not easy, and there might be a serious porting effort from existing C++ code. But I think that's nothing really new for C++ developers, differences in data types, OS APIs (e.g. for networking), allowed threading models, allowed exception handling already exist in a lot C++ target platforms. When you look at the embedded market it gets even worse. What I mean is that writing cross plattform C++ code is never easy, and that's not due to webassembly.
Still webassembly will be very helpful for some applications or even only libraries which have very high performance requirements. And porting some existing desktop applications might be easier than completly rewriting them to JS. But I guess for most websites and webapplications [transpiled] JS will be the more productive choice.
I found the "there is no main loop" comment not that fair, as I think javascript is one of the few languages which has a mainloop (aka eventloop) already built in. It's not a spinning loop like what you would build in a C++, but continously enqueing the main loop iterateration handler in setImmediate or similar should give the same result.