←back to thread

160 points todsacerdoti | 2 comments | | HN request time: 0.444s | source
Show context
peutetre ◴[] No.41903189[source]
With WebAssembly getting better both on the client side and the server side, when WebAssembly achieves better performance than JavaScript, and when with WebAssembly you have the opportunity to use almost any other language, why would you use JavaScript?
replies(2): >>41903247 #>>41911674 #
wiseowise ◴[] No.41911674[source]
Because it has terrific data notation, pleasant to use with Promises + async/await, has a ton of modern QoL improvements and slapping TS on top of it automagically turns it into one of the most modern and advanced languages out there with adequate performance.

Add to that amazing tooling with hot reload (bye bye 2-5 minutes compile times), billions of investments from Big tech to make it better and faster, ability to reuse same code between mobile/backend/frontend, integration into browser and you’ll quickly find that JS literally has no rival.

replies(1): >>41911769 #
peutetre ◴[] No.41911769[source]
Except after billions of investments from Big Tech, existing JavaScript applications get double the performance by switching to WebAssembly:

https://web.dev/case-studies/google-sheets-wasmgc

And with the advent of WebAssembly, any language integrates with the browser.

So why am I using JavaScript again?

replies(1): >>41911885 #
wiseowise ◴[] No.41911885[source]
Oh God, narrow use case within Sheets that fits perfectly for WASM is only twice faster than JS, JS in shambles. Why won’t they rewrite everything in WASM?

I’m not sure what you were aiming for here, but you only reinforced me that JS is amazing if rewriting calculation worker yields only 2x improvement.

> So why am I using JavaScript again?

Re-read my comment, it’s all there.

replies(1): >>41911924 #
1. peutetre ◴[] No.41911924[source]
A spreadsheet is a narrow use case? Excel won't die: https://www.economist.com/business/2024/10/15/why-microsoft-...

Try not to worry about it. Welcome your WebAssembly overlords and be happy.

replies(1): >>41912073 #
2. wiseowise ◴[] No.41912073[source]
> A spreadsheet is a narrow use case?

No, it’s not a narrow use case. I wake up my phone to spreadsheet calculation, I open HN - a little bit more spreadsheet, my kettle heats water via power of spreadsheet algorithm. Amazon purchase? Only via spreadsheets.