4 ms·
I'm not as excited for this as I used to be. In most user applications JavaScript is good enough or better. If it wasn't then we wouldn't be taking the browser
by isaiahg 9y ago
I'm not as excited for this as I used to be. In most user applications JavaScript is good enough or better. If it wasn't then we wouldn't be taking the browser to make desktop applications. Recently I decided to make a desktop app and asked around about the different UI libraries. The answer I keep getting is "just use electron and JavaScript". Why? Because love it or hate it the Dom is fantastic and simple for making UIs that are interactive and reliable. And you can't beat JavaScript for manipulating the Dom.
The only benefit I can think of that benefits is specialized software like games or scientific analysis/simulation. But for what most users want, JavaScript is fast enough. The example I keep hearing is "imagine gimp in the browser" but it's already possible to make a gimp like application in the browser using things like canvas and the file api.
So by the time webassembly is ready for the prime and has needed features like memory management and Dom access, will it even by worth it beyond a few specific applications?
- mythmon_ 9y agoOne interesting thing to me is that you don't have to write an entire app using only WebAssembly or JS. You can take the classic approach of benchmarking to find hotspots, and then optimizing those. Migrating these performance sensitive sections to more performant code can be a win.
- steven777400 9y agoI'll agree with you that modern HTML and CSS for presentation is best-of-breed. I'll accept that the DOM API is sufficient. But neither of those necessitate JavaScript; JS is just a language that happens to run in the browser and has DOM API bindings (and the other browser APIs too). There's no reason those identical bindings couldn't be provided in any other language.
- wruza 9y ago>you can't beat JavaScript for manipulating the Dom. Exactly. Only javascript can access attributes and call functions so good on exported document and window objects.
- andrewingram 9y agoI know that Figma is built on WebAssembly now, and has quite impressive performance.
- zanny 9y ago> will it even by worth it beyond a few specific applications? I'm sure if you sampled all developers the number that would say Javascript is their favorite programming language would be in a substantial minority. So if it makes it easier for developers to write client side code in their preferred language its worth it. That being said, I'm worried a bit. Javascript being awful has traditionally kept developers doing as much runtime work as possible server side. In the last 5 years the rapid growth of JS libraries, client side frameworks, and recently ES6 have all reduced the pain points and correlated to a dramatic rise in client side code being loaded on users computers with corresponding huge page size bloat.
- colordrops 9y ago> I'm sure if you sampled all developers the number that would say Javascript is their favorite programming language would be in a substantial minority. I wouldn't be so sure of that.
- dvddgld 9y agoAgreed, it'd likely be one of the largest shares
- Momquist 9y agoYou should check some of the SO developer surveys. I think you'd be surprised... https://insights.stackoverflow.com/survey/2017#technology-most-loved-dreaded-and-wanted-languages https://insights.stackoverflow.com/survey/2017#technology-mo...
- dangjc 9y agoJS is enough for most application code. There are libraries that have and always will be in C, C++, or something similar, and it would make the most sense to wrap and expose them for different environments. JS makes no sense for shared libraries.
- Houshalter 9y agoThere are a lot of better image compression formats than jpeg and png. With wasm you could have a very fast client side decompression and save a ton of bandwidth.
- rrhd 9y ago> In most user applications JavaScript is good enough or better If you are willing to toss performance out the window. Electron is just turning dev work into user headaches.