Hacker News new | ask | show | jobs
by rnentjes 3241 days ago
Actually the javascript target has been fully supported since version 1.1.

For example here is a single page app written with kotlin: https://github.com/rnentjes/simple-password-manager

2 comments

How efficient is the conversion performance-wise and code-length wise? Can I finally get rid of GWT if I want to develop web apps with JVM tooling? Is the debug mapping between JS variables and JVM variables better than with GWT and super dev mode? Is it easy to use Kotlin with ReactVR/Native?
With the 1.1.4 version they have added a dead code eliminator which really helps with the resulting javascript length. In the example above the resulting javascript file is 440 KB (zipped 113 KB). Which is not bad if you take into account that the included libraries are more than 2MB (the standard library and static html builders being the biggest ones).

I haven't measured runtime performance, but I haven't noticed anything being slower than plain javascript yet. A clean compile in this example takes ~8 second, incremental compiles takes 3-4 seconds.

The jvm doesn't play a role when targeting javascript so I am not sure what you mean with JVM variables and I don't know much about GWT. But you can debug the resulting javascript from intellij and step through the kotlin sources if you want.

I don't know how easy it is to integrate with react.

Is isomorphic Kotlin a thing yet?
This stack is isomorphic no?
You might be right, I was certain I read somewhere that some things might still change.