5 ms·
I read this article several times, however I still have't understood how JS and WASM will be live together? If I can use C/C++ with static typing(of course if
by _alexander_ 11y ago
I read this article several times, however I still have't understood how JS and WASM will be live together?
If I can use C/C++ with static typing(of course if I can do DOM manipulation from my C/C++ program) why I should use JS?
- spicyj 11y agoWhy would you ever use any language over C/C++? Different abstraction levels, type systems (or lack thereof), ecosystems of libraries, even syntaxes all contribute to a decision in choosing a language. You might not like JS personally but there are plenty of things to like about it and many other people do. In practical terms, browsers will support JS forever for backwards compatibility even if all new code is written in WASM.
- _alexander_ 11y agoPersonally I really like JavaScript and I use it many years.
- koder2016 11y agoWhat happens when a monopoly is broken? A healthy competition ensues. The "misunderstood" language will still be used by devoted fans, the rest of developers will be able to have their pick as it should have been to begin with.
- ethbro 11y agoThere was an article on the history of Internet standards that I really liked that noted the most effective and adaptable standards had all essentially been API-like rigidly-defined-but-simple boundaries. The relationship between WASM and JS seems to be "js/js virtual machines are a de facto standard, so let's not repeat the mistakes of Java plugins and instead build off that foot-in-the-door."
- nv-vn 11y agoBecause using C or C++ for a website frontend would make your code 10x longer and more likely to have bugs.
- JupiterMoon 11y agoIs this assertion actually based on any data?
- kevingadd 11y agoC/C++ doesn't have any sensible way to interact with the DOM and the JS GC heap directly, so that's one reason you'll want javascript code to stick around. Your website/application will probably need access to some JS libraries for things like analytics, as well.
- robmcm 11y agoYou could mix and match modules and library perhaps. You could make the same argument about any higher level language, even those with as many quirks as JS, like PHP ;)