7 ms·
This is supposed to kill javascript(hopefully)
by thefounder 8y ago
This is supposed to kill javascript(hopefully)
- austincheney 8y agoWASM is a parallel technology with no intention of impacting JavaScript, according to its spec. Therefore WASM will never replace JavaScript. JavaScript can be replaced, but it won't be WASM that does so. https://webassembly.org/docs/faq/#is-webassembly-trying-to-replace-javascript https://webassembly.org/docs/faq/#is-webassembly-trying-to-r... https://webassembly.org/docs/js/ https://webassembly.org/docs/js/
- rkangel 8y agoThis may not be a goal of the project, but it is still the hope of a lot of people. When parity with JS is reached in terms of ability to access the DOM and JS interop, then there shouldn't be much advantage to JS, and possibly a performance penalty. Having one language in a 'privileged' position for a platform isn't ideal. At least with the mobile platforms ObjC could be supplanted by Swift, and Java by Kotlin.
- austincheney 8y ago> This may not be a goal of the project, but it is still the hope of a lot of people. I hope for world peace. > When parity with JS is reached in terms of ability to access the DOM and JS interop There is work being down on DOM interop, but its not what clueless people think it is. DOM interop allows JavaScript interaction to WASM via the DOM. It doesn't allow WASM to creep out of its sandbox to become some magical JavaScript replacement. Even if it did, you would still have to learn to access the DOM. Most developers completely fail at this point. Somehow the DOM is scary. > Having one language in a 'privileged' position for a platform isn't ideal. Why not?
- pedrocr 8y agoThese threads always repeat themselves. There are the people painfully explaining why they would like to be able to program for the web in the languages they like. And then there are the JS advocates that take it personally and go out of their way to explain why JS is all you need. Even though no other platform forces you into a single language somehow the web is different.
- austincheney 8y agoWeb technologies are defined by standards that define the limitations of said technologies no matter how sad people get about it.
- pedrocr 8y agoI don't understand what you mean. The standards have to be defined and as demonstrated by wasm there's nothing preventing a runtime that all languages can target that isn't just compiling to JS. How that was ever considered a solution is just mindboggling. What was delivered by wasm is something that we've wanted for 10 years and were repeatedly told was not possible. Even today there are people in this very thread arguing that was is already available is not possible...
- afiori 8y agoBut the web is different, web pages (HTML/CSS/JS + whatever) are script supposed to run in the browser and offer a fairly uniform interface. You can already compile to javascript, and also platform like android force you to use some of the native language. The difference is that the web has a very different security model, where for example it is unthinkable to ship binaries.
- thefounder 8y agoJavascript was not designed as compile target. Stop this insanity! You can sandbox wasm. It's not unthinkable. It's real!
- 8y ago
- FridgeSeal 8y agoAu contraire: if people can ship WASM to the browser to do what they’re currently doing with JS, but it’s faster, in nearly whatever language they like and just as nice/if not nicer, then they’ll stop writing JS. I’ve long maintained that the reason that JS is so prelevant and popular is the result of it exclusively being the only language allowed in the browser. Mozilla has already proven that a Rust WASM can take in the DOM, do all the necessary transformations and hand back the final result faster than JS can transform it. Host binding protocols are the first step in negating the necessity of JS. Once a direct DOM <-> WASM API comes along (and it will), JS will be as good as deprecated.
- krapp 8y agoYou're forgetting two relative benefits to JS - it can be written in a text editor and it doesn't require knowledge of a second language, toolchain and compiler. A lot of javascript is still hand written. Also, deprecating JS would mean deprecating functionality most of the web itself. No one is going to rewrite all existing javascript in Rust or C or whatever and compile it to WASM. Like it or not, as long as the web exists, javascript has to exist, browsers have to support it.
- FridgeSeal 8y ago> it can be written in a text editor Are there programming languages that we don’t use as targets that can’t be written in a text editor? I’m not sure what you mean here. I can write Rust, C, C++, Python, Swift, .Net, etc etc in a text editor with no more difficulty than JS? > it doesn't require knowledge of a second language, toolchain and compiler. A lot of javascript is still hand written. Have you not seen the borderline arcane processes and quantity of tooling involved in “compiling” and bundling JS applications? It’s nightmarish and far more convoluted than literally any other language I’ve dealt with. > Also, deprecating JS would mean deprecating functionality most of the web itself. Oh no, what a pity, large chunks of bloated websites will go away. I’m sure we’ll all miss them greatly, they made such a great difference to our lives. /s > No one is going to rewrite all existing javascript in Rust or C or whatever and compile it to WASM. You don’t have to write it in whatever low-level language, I’m sure any number of higher level languages will get support. Also, we dropped flash pretty hard and fast, and I distinctly, distinctly remember a huge number of websites being entirely flash. It’s maybe not going to go away entirely, but it will hopefully cease to become as popular as it is now.
- pjmlp 8y agoThe Pandora box is already open, haven't you noticed it? https://platform.uno/ https://platform.uno/ https://blog.qt.io/blog/2018/05/22/qt-for-webassembly/ https://blog.qt.io/blog/2018/05/22/qt-for-webassembly/ https://blazor.net/ https://blazor.net/ http://teavm.org/ http://teavm.org/ https://www.leaningtech.com/cheerp/ https://www.leaningtech.com/cheerp/ Telling everyone what the purpose of WebAssembly is regarding JavaScript doesn't matter, unless browser vendors decide to backtrack on it.
- austincheney 8y agoWeb technologies are based on standards otherwise there is no conformance. If you want something different advocate for a change to the standard. > The Pandora box is already open, haven't you noticed it? WASM has been widely available for a while now in all major browsers and yet the fantasy of replacing JavaScript still has not come to pass. I guess I haven't noticed it.
- pjmlp 8y agoCompanies are still migrating from IE 8 to IE 11 on their RFPs requirements list, and WebAssembly is at 1.0. Flash will come back rest assured. I am already using pure browser versions of WebEx and Citrix. While Autodesk customers can play with their AutoCAD projects on the browser.
- austincheney 8y agoWhen talking about web technologies I am astonished by the repeated irrationality. Most JavaScript developers are deathly afraid of the DOM. They will happily sink their careers over it and perform 100x more work to not contend with it and justify the strangeness of that reasoning in really creative irrational ways. It’s bizarrely fascinating. That phobia is further strange considering it’s about a skill that can be learned in 2 hours of active study and mastered in 4. Then there are people who are equally fearful of JavaScript. Again, they will justify their phobia in all manners of ways at great energy. They will even form an alternate future reality to justify knowingly bad decisions in the present. Both of the groups are really demonstrating the same phobia with all the same behaviors but just slightly shifting the subject a bit. What’s ironic though is that the people afraid of JavaScript, and thus having little to none experience working with or understanding the DOM, really want access to DOM. When you get past the irrational fear around these things the motivations of the technologies and their direction becomes something completely different. This is why web technologies are difined in one way and yet people strangely impose their own alternate realities, abstractions, and unfounded projections upon them. It’s also why the standard technologies are slow, intentionally so, to reflect certain things even those things are highly demanded. I have encountered these phobias enough, even in person, that I am curious to learn more about them and how they arise.
- thefounder 8y agoJavascript exists because you can't run anything else in the browser. wasm allows you tonuse your fav language so I can't see why anyone would use JS once wasm gets DOM access
- austincheney 8y agoWASM is getting DOM access, but there is nothing indicating that DOM access is to the page containing the WASM instance.