Live data from Hacker News

WasmGC – Run GC languages such as Kotlin, Java in Chrome browser

developer.chrome.com

1–10 of 88 posts

Re: WasmGC – Run GC languages such as Kotlin, Java in Chrome browser

#2
This starts to open a lot of very interesting new doors for web development in general.

JavaScript is suddenly no longer the only real game in town it seems.

I mean sure WASM has allowed C, C++ and Rust to run on the web for awhile now but they aren’t typically languages that web developers tend to have a lot of knowledge of or interest in learning.

But Dart, Kotlin and Java for example, they very much are viable replacements for many TypeScript or JavaScript use cases and the mental jump from TypeScript to any one of those three isn’t particularly onerous.

We still don’t yet have direct DOM access from within WASM but I know both Kotlin and Dart at least are building a glue layer to fix that. (Example of Dart’s here: https://github.com/dart-lang/web/blob/main/test/smoke_test.d...)

It also opens up the door for a UI framework that skips the DOM and goes directly down the canvas and WebGPU path which is what Flutter are aiming towards.

The web platform needs to decouple accessibility from the DOM in order to make that not just an opaque blob of pixels that a canvas element is currently but work is already underway on that via the Accessibility Object Model API.

I think this gets us to a pretty exciting place just over the horizon.

I’m excited to see the next few years but I think it’s at least start thinking about if JavaScript or a compile to JavaScript language is really the best option in the near future now that it’s no longer the only choice available.

Re: WasmGC – Run GC languages such as Kotlin, Java in Chrome browser

#3
I like using apps on web, like Figma ..etc, no download or update manager, just open an URL.

But currently these apps just don't have the fluidity, that's there with native apps, also maintaining large JS codebase is horrible, Typescript doesn't help much in my opinion.

WebGPU + new development languages, will hopefully send web-apps to the next level.

Re: WasmGC – Run GC languages such as Kotlin, Java in Chrome browser

#4
post #3

I like using apps on web, like Figma ..etc, no download or update manager, just open an URL. But currently these apps just don't have the fluidity, that's there with native apps, also maintaining large JS codebase is horrible, Typescript doesn't help much in my opinion. WebGPU + new development languages, will hopefully send web-apps to the next level.

I agree that Typescript is really a band aid solution at best.

You are trying to put types on top of something that wasn’t designed with types in mind at all and you often end up with some insanely and unnecessarily complicated types as a result.

Take this as an example of mixins which are a fairly common pattern.

https://lit.dev/docs/composition/mixins/#mixins-in-typescrip...

Now take a look at the same thing in a modern well designed language

https://dart.dev/language/mixins

It’s not just that but even when you consider some of the design decisions.

To stick with TypeScript and Dart once again, I mean, they both technically have enums which is an incredibly useful data type but the difference between them is like night and day.

TypeScript: https://www.typescriptlang.org/docs/handbook/enums.html

Dart: https://dart.dev/language/enums

And then finally on top of that, because the goal is no longer to compile to JavaScript you can bring in all kinds of useful language features like this which don’t have an equivalent that I know of https://dart.dev/language/extension-methods

Re: WasmGC – Run GC languages such as Kotlin, Java in Chrome browser

#5
post #3

I like using apps on web, like Figma ..etc, no download or update manager, just open an URL. But currently these apps just don't have the fluidity, that's there with native apps, also maintaining large JS codebase is horrible, Typescript doesn't help much in my opinion. WebGPU + new development languages, will hopefully send web-apps to the next level.

Figma already uses WebAssembly

Re: WasmGC – Run GC languages such as Kotlin, Java in Chrome browser

#6
post #2

This starts to open a lot of very interesting new doors for web development in general. JavaScript is suddenly no longer the only real game in town it seems. I mean sure WASM has allowed C, C++ and Rust to run on the web for awhile now but they aren’t typically languages that web developers tend to have a lot of knowledge of or interest in learning. But Dart, Kotlin and Java for example, they very much are viable rep…

The revenge of plugins is almost complete.

Re: WasmGC – Run GC languages such as Kotlin, Java in Chrome browser

#9
post #2

This starts to open a lot of very interesting new doors for web development in general. JavaScript is suddenly no longer the only real game in town it seems. I mean sure WASM has allowed C, C++ and Rust to run on the web for awhile now but they aren’t typically languages that web developers tend to have a lot of knowledge of or interest in learning. But Dart, Kotlin and Java for example, they very much are viable rep…

> I mean sure WASM has allowed C, C++ and Rust to run on the web for awhile now but they aren’t typically languages that web developers tend to have a lot of knowledge of or interest in learning.

I think that main use case is not for the web developers who already know the tech needed for web development but actually vice-versa. E.g. you're a C/C++/Rust developer and you want to expose your product as a browser service - you transpile it to wasm and with a bit of JavaScript you integrate it into the end service. And that landscape is now expanding to other languages too, namely the ones with the GC.

Re: WasmGC – Run GC languages such as Kotlin, Java in Chrome browser

#10
post #2

This starts to open a lot of very interesting new doors for web development in general. JavaScript is suddenly no longer the only real game in town it seems. I mean sure WASM has allowed C, C++ and Rust to run on the web for awhile now but they aren’t typically languages that web developers tend to have a lot of knowledge of or interest in learning. But Dart, Kotlin and Java for example, they very much are viable rep…

I don't see the "binaryification" of the web platform happening any time soon (if ever). The web is (and should remain) fundamentally about the transmission of documents. Javascript+DOM allows for the dynamic updating of said documents, and this is what the main thread (asynchronous event loop) is all about. For all "heavy lifting," the logic should go into worker threads, where there isn't any DOM access anyway. I think a decent rule of thumb is that WASM modules should generally only be used in these kinds of off-the-event-loop types of worker threads.

(See https://linuxontheweb.github.io/ for my implementation of a new kind of web application platform where these kinds of ideas can start becoming a reality.)

Post reply on HN