WebAssembly support

I haven’t read enough to be sure of it, but if all the existing JS goodies (from jQuery to Angular) are not available in WebAssembly, this would render Kotlin irrelevant for usual front-end work for a considerable time; it’s not a show stopper, but a thing to think about;

That’s not a big issue. There are two kinds of developers who would use Kotlin on frontend: those who already write server-side logic on Kotlin and want to write some front-end as well and those who came from JavaScript world. Libraries are often important for the latter ones. However, what is the reason for them to drop their favourite ES, TS, CoffeScript and get Kotlin. From my experience with GWT I can say that you usually don’t need these libraries, nor anything from usual JS frontend stack.

Another concern is that we can divide JS libraries into two big sets: libraries and frameworks. Libraries are things like WYSIWYG editors, map viewers, complex table views, etc. They don’t dictate you certain way of writing you code. You write the code as you like and include these libraries. Frameworks like Angular, React, Aurelia do things for you, but force you to organize the code in a certain way. This is usually “JS-way”, which is quite different from statically-typed “Kotlin-way”. So you end up writing JavaScriptish Kotlin code instead of writing on idiomatic Kotlin. There’s no difference for developers of second kind (so why choose Kotlin), and a big pain for delopers of first kind.

WASM is a completely new unoccupied ecosystem that lacks excellent languages like Kotlin. It’s a good chance to occupy it. When we have army of WASM/Kotlin developers who write libraries and fraweworks, it’ll be easier to port these libraries to JavaScript rather than wasting time trying to adopt existing libraries to Kotlin.

4 Likes