Remix.run Logo
exabrial 8 hours ago

Why in 2025 can we not ship a statically typed high performance language for browsers?

afavour 8 hours ago | parent | next [-]

Because every time someone proposes it the immediate follow up is “which language?”, which everyone argues about until they’re exhausted and give up.

Which is why WebAssembly is the right answer.

muvlon 7 hours ago | parent | prev | next [-]

I'm a huge fan of statically typed languages, but shipping statically typed code as an artifact seems like it loses all of the advantages.

What does it matter to the user whether they get a runtime or a "compile time" error in their invisible devtools console? To them, the page simply doesn't work.

Static languages make sense when compilation happens at dev-time, where the actual devs can respond to the diagnostics. So it's far better to develop in a statically typed language, compile it ahead of time and ship that to the user. Which is exactly what people do now with wasm.

pveierland 8 hours ago | parent | prev | next [-]

Rust runs quite well today via WebAssembly. Continuing to improve interop between Web API / WASM / language runtimes seems like a good route that allows people to use the language they prefer against shared Web APIs.

z3t4 8 hours ago | parent | prev | next [-]

Dart is a statically typed high performance language intended for the browser. For a short time you could run Dart in the Chrome browser - as a JavaScript alternative. They then decided it was better to transpile to JS... JavaScript is already strictly typed and safe, but the dynamic nature makes it difficult to optimize. So I think it's a weird decision to transpile to JS.

paulryanrogers 8 hours ago | parent | prev | next [-]

Because there is no consensus on what that should be, and vendors have so little motivation they just outsource most browser development to Google.

wouldbecouldbe 8 hours ago | parent | prev | next [-]

Developers always on their high horse, if after years of trying different options it didnt happen, maybe that means it's not what the world wants or need?

throw_m239339 8 hours ago | parent | prev [-]

> Why in 2025 can we not ship a statically typed high performance language for browsers?

Which one?