Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

no, WASM will not replace JS unless somehow, overnight, the idea of downloading 30mb of compiled runtime libraries to read an inaccessible-to-screenreaders news article becomes appealing.

but i wouldn't hold my breath for 1990's style java applet loading throbbers to come back into fashion. there's a reason that stuff got outcompeted by the supposedly "inferior" javascript.

what wasm competes with is flash games, insecure java applets, and npapi and nativeclient in general.



In all fairness, javascript should have never even been required to display a news article. Javascript makes up for a lot of the shortcomings of HTML.


JS isn't required to display a news article, and never has been. You can make a fast, beautiful and modern news site using only HTML and CSS, without a byte of JS.

Take a look at the source for any molasses-slow news site. The only site-specific JS will be jQuery, and a few basic event handlers to do things like show and hide elements, which could have been done with CSS.

99.9% of the JS will be advertising, analytics, and tracking. People understand that these sites are tracking them, but I think most people have not idea just how much tracking is going on. Major news sites have hundreds of tracking libraries loaded per-page. That is the only reason they are slow.


And adaptive design, auto-complete, client side validation of forms, etc. But all of which should be handled by a better CSS/HTML


Well, 5G is not that far. Remember when SPA was considered too "fat"? Now most of the web apps are SPA with few MBs to download.


SPAs are still considered too fat. how do you miss the nearly daily "web bloat crisis" stories on HN?


You're probably access web sites sitting at home or office, where you have decent 10+ Mbps channel. All this changes when you travel and you use either slow public WiFi or phone tethering. Yes, there's 4G, but in most places in most countries 4G coverage is very poor: it's only in the most populated areas.

I travel between countries and of course I hate staying in huge cities because they're expensive and noisy. But when you move to smaller towns, there're usually limited options for connecting to the Internet.

Last year in India I spent 2.5 hours incessantly trying to open my bank website to make an urgent payment. All these huge React/Redux bundles were loading for ages, and they aren't cached and there's no support for resuming download after it dies because of some timeout or because you were looking at the spinner for 30 minutes and decided to click reload button.

And even when these huge SPA load, they're totally broken on slow connections. People become lazy and they don't handle timeouts and responses coming in weird order because of the slow channel. Even if you manage to open SPA on slow connection, it's a pain to use, almost impossible with all these XMLHttpRequests on every click transferring megabytes of data after every click or typing any letter. :(


Well, I'm talking about "state of the art" apps. You can always fallback to server-side rendering/pure html if the connection is too slow and you can't afford the boostrap/init download. Depending on your use case SPA may actually be an improvement as the static resources can be cached. WASM is supposed to compete with native apps. Why don't you complain about MBs to download on native apps?


>>10+ Mbps channel

that's peasant level net :P. 100 or bust {literally what I have home and better at work). seriously though, indeed the web is overbloated and I don't think there is coming back


It got outcompeted by Flash, JavaScript had zero to do with it.

Had Apple not forbidden Flash on iOS, there would be no JavaScript superiority to talk about.


I invite you to try your favourite flash website in Puffin browser to see how "great" an experience flash on an iphone is.


Surely not worse than what JavaScript is.

Thankfully on Android and WP devices I was able to take the battery out, when the web site developer got too creative for the device's CPU/GPU.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: