9 ms·
In my view, JS is preferable because you are forced to ship source to the client. This provides a beneficial atmosphere for learning and sharing solutions. Comp
by javajosh 4y ago
In my view, JS is preferable because you are forced to ship source to the client.
This provides a beneficial atmosphere for learning and sharing solutions.
Compiling to WASM, and front-end builds in general, take this critical and unique quality away from the web platform.
Rust-to-WASM is another attempt to abstract away the pain of JavaScript, attempts which began soon after the world discovered XHR. In fact Google released GWT specifically to appeal to Java devs who took one look at JS and said "no thanks".
This is not so say that there aren't legit uses for this technology - its a great way to port other software, like sqlite or linux into the browser.
But as a way to make applications designed to run on the web?
I suggest that any dev that thinks this is necessary to have a good dev experience take the time to attempt to write a web app with just raw html, css, and js targeted at a modern browser.
There's a lot of space there left to explore, I think, before labeling it as an unwieldy thing that must be wrapped in a safer abstraction to even think of touching.
- VWWHFSfQ 4y ago> you are forced to ship source to the client. This provides a beneficial atmosphere for learning and sharing solutions. This hasn't really been true anymore for quite a long time. Pretty much everything is bundled, minimized, and obfuscated now.
- ModernMech 4y agoBut it's still source, no?
- VWWHFSfQ 4y agoMaybe by some legal definition. But I don't think most people would consider it source code anymore.
- govolckurself 4y agoThis is the weirdest gotcha. Nobody said it wasn't source anymore, they implied that it wouldn't be readable or conducive to sharing because it's unreadable.
- marcosdumay 4y agoAbsolutely not. Source code is the multi-file project you have where you call webpack or a modern variant of it. The thing people ship on their sites is compiled.
- javajosh 4y ago>Pretty much everything is bundled, minimized, and obfuscated now. Yes, but there is a strain of software minimalism that eschews the front-end build entirely. This is relatively recently possible because of excellent implementations of relatively good standards starting with HTML5, CSS3, ES6, and SVG2. https://www.jslint.com/ https://www.jslint.com/ is an example of what's possible with ES6 and built-in modules.