bashor
04/03/2017, 4:49 PM1. TeaVM is tightly integrated with "server-side" build tools like Maven (or, unofficially, Gradle). kotlinc-js tries to be more friendly to npm, WebPack, etc.Actually, Kotlin tries to be friendly to both sides — server and client. Right now Kotlin (both JVM and JS) has integration for gradle, maven, and ant. Also, Kotlin JS has frontend-plugin (see above).
2. TeaVM is a closed-world compiler. It takes all available modules and tries to perform hardcore optimizations. kotlinc-js only sees one module and can't make any assumptions about the code.Kotlin JS compiler sees all things what are required to compile a current module. And it, of course, can use this information or save to use later, for example in optimizations. But Kotlin JS compiler doesn't do it now.
3. TeaVM is intended for back-end developers who are used to Java ecosystem and want to reuse it as much as possible rather than learning completely new JavaScript ecosystem. kotlinc-js forces you to learn JavaScript ecosystem.Kotlin forces you to learn your platform (JVM or JS) as much as TeaVM. How much is it depends on a level of API you are using. You can use high-level API (libraries) to avoid interactions with a native runtime, but I'm sure, sooner or later, you will have to interact with your native runtime.
4. TeaVM has its own framework which follows Kotlin/Java programming idioms, while kotlinc-js tries to integrate with React.js, which follows JavaScript idioms.To be clear, working with React.js is only one of possible ways. Also, You can interact with any other libraries or frameworks, work with dom or your runtime directly and, of course, write your own. cc @konsoletyper