The potential of Kotlin/WASM
seb.deleuze.fr
The potential of Kotlin/WASM
1–10 of 46 posts
Re: The potential of Kotlin/WASM
#2Re: The potential of Kotlin/WASM
#3It's been exciting to watch the development of the new K2 compiler and Frontend-IR format
Kotlin is no longer just a JVM language, but more like a frontend with targets that now span everything from JVM bytecode, JavaScript, native code with Kotlin Native, and WASM
I'm really excited to see what the future holds for Kotlin and WASM in particular
Re: The potential of Kotlin/WASM
#4Re: The potential of Kotlin/WASM
#5It would not really be very web like. It'd be more like Flash or a Java Applet. User extensions would all be broken.
This is a new thing coming people. Now that we have wasm, the native-app folks are super jazzed about not only switching programming langauges, but getting rid of HTML and the DOM. The plan goes: we're replacing structure markup & hypertext of webapps with just-a-bunch-of-pixels, big canvases, that are purely computational constructs. Declarative information is getting blown up by imperative processes; this is how native apps are having their revenge against webapps. I have yet to see how any of this actually empowers or helps users: it seems like a huge downgrade, done purely to give developers alternative options. Maybe the experiences really are vastly better, maybe what we make is categorically different once we have this tech! But I really have a hard time (given what creativity we've had & seeing how quickly bootcamp folks come in & get hacking on the DOM) believing the DOM is really so horrible that it justified de-internet-izing the web & that turning it into a motion picture machine is warranted (as anything more than early exploration).
The web starts with the HTML/DOM, and has been our computing world's greatest, most universal tower of Babel[1] that has held. I'm curious (and admittedly pretty terrified) to see who is happier/winners when we bring down the higher-level system, & treat it like a low level interface, like a big Canvas, like what was happening with Flash & Applets. Two other recent examples beyond Kotlin/Compose: Flutter/CanvasKit (which I commented on & got a reply from the lead about on these topics[2]), and Hixie's "Towards a Modern Web Stack"[3].
[1] https://unwindprotect.com/tower-of-babel https://news.ycombinator.com/item?id=34695638
[2] https://news.ycombinator.com/item?id=34527980
[3] https://docs.google.com/document/d/1peUSMsvFGvqD5yKh3GprskLC... https://news.ycombinator.com/item?id=34612696
Re: The potential of Kotlin/WASM
#6Thank you for the work on KoWasm It's been exciting to watch the development of the new K2 compiler and Frontend-IR format Kotlin is no longer just a JVM language, but more like a frontend with targets that now span everything from JVM bytecode, JavaScript, native code with Kotlin Native, and WASM I'm really excited to see what the future holds for Kotlin and WASM in particular
Re: The potential of Kotlin/WASM
#7> But WebAssembly becomes even more interesting when you take another perspective. What if Compose for Web, the multiplatform incarnation of Jetpack Compose used on Android, would leverage Kotlin/Wasm instead of Kotlin/JS to perform pixel-perfect Canvas based rendering? It would not really be very web like. It'd be more like Flash or a Java Applet. User extensions would all be broken. This is a new thing coming peopl…
The amount of experience and knowledge that has gone into fixing edge cases like accessibility, viewports, cross-browser support, security, etc. makes any kind of 'pure wasm' app a nightmare to maintain.
Re: The potential of Kotlin/WASM
#8Thank you for the work on KoWasm It's been exciting to watch the development of the new K2 compiler and Frontend-IR format Kotlin is no longer just a JVM language, but more like a frontend with targets that now span everything from JVM bytecode, JavaScript, native code with Kotlin Native, and WASM I'm really excited to see what the future holds for Kotlin and WASM in particular
Yet most of kotlin standard library is still functions extensions to Java package classes (jvm), if you filter out the function listing in the kotlin website to only implementations common across targets (Common tag), there is very little to be usable.
Re: The potential of Kotlin/WASM
#9> But WebAssembly becomes even more interesting when you take another perspective. What if Compose for Web, the multiplatform incarnation of Jetpack Compose used on Android, would leverage Kotlin/Wasm instead of Kotlin/JS to perform pixel-perfect Canvas based rendering? It would not really be very web like. It'd be more like Flash or a Java Applet. User extensions would all be broken. This is a new thing coming peopl…
What? The canvas is not new, you've been able to dump the DOM and make canvas-only UI for many years.
The "new thing" is just improved code sharing if you are making a canvas-y thing for multiple platforms. And letting people use their preferred language if not JavaScript.
Re: The potential of Kotlin/WASM
#10> But WebAssembly becomes even more interesting when you take another perspective. What if Compose for Web, the multiplatform incarnation of Jetpack Compose used on Android, would leverage Kotlin/Wasm instead of Kotlin/JS to perform pixel-perfect Canvas based rendering? It would not really be very web like. It'd be more like Flash or a Java Applet. User extensions would all be broken. This is a new thing coming peopl…
What does it really offer? Performance and flexibility? It will probably continue to be a niche for really specific high performance applications but the DOM will always exist as long as 99% of the internet is just viewing or uploading text/images/videos. The amount of experience and knowledge that has gone into fixing edge cases like accessibility, viewports, cross-browser support, security, etc. makes any kind of '…
While it really is bad, it offers things that need to be reimplemented by everyone from scratch if they go with Canvas, WebGL or WebGPU such as:
- accessibility
- text rendering (including proper font rendering, LTR text, multilanguage text, text selection etc.)
- even smaller things like tabindex