4 ms·
Correct me if I'm wrong, but I think the relationship of Java and JS in ScalaJS and Kotlin is about the same: If your Scala/Kotlin code depends on any Java clas
by raquo 11y ago
Correct me if I'm wrong, but I think the relationship of Java and JS in ScalaJS and Kotlin is about the same: If your Scala/Kotlin code depends on any Java classes, you won't be able to compile it to JS. You can only compile pure Scala/Kotlin code to JS (and that comes with a few caveats in both cases).
It's true that Kotlin's JS support is pretty raw today. There are virtually no docs for it for example. They do have a basic feature set working though. I think in a few months it should be in great shape.
- stewbrew 11y agoScala has a bigger runtime, which is supported by ScalaJS. ScalaJS also has implementations for some Java classes. There are also some Scala libraries with explicit support for ScalaJS around. Kotlin relies more heavily on the underlying runtime. Unless they re-implement a large part of the Java standard library in JS, they'll never achieve that level of compatibility.