
Kotlin 1.3.50 Released - ptx
https://blog.jetbrains.com/kotlin/2019/08/kotlin-1-3-50-released/
======
jillesvangurp
Dukat is interesting. Right now, typescript is a popular replacement for
javascript. However, I've always regarded it as a bit of a gateway drug for
people to find their way to a bit more higher level languages. Like Kotlin.

What Dukat does is leverage typescript type definitions for javascript
libraries to automatically generate Kotlin type wrappers. This basically means
kotlin is inching closer towards the goal of being a replacement for
typescript/javascript. Right now it's not for the faint hearted as the tooling
is still a bit lacking. However, the ergonomics of using a proper IDE to do
web development is very nice and Kotlin comes with a lot of language features
that are very nice to have when doing complex asynchronous processing in
modern UIs. E.g. co-routines vs. async-await in typescript is just a lot less
clumsy/painful/error prone. Dukat is of course experimental.

I'm not actually sure that playing nice with the javascript world is relevant
long time because of other things happening in Kotlin that will likely make
that less important. I expect a lot of things will start changing during the
1.4 and 1.5 cycle in the Kotling world:

1\. kotlin-js tooling will stabilize and become more robust (much needed).
Right now if you really want to, you can do some nice frontend development
with just kotlin. However, my experience is that you end up fighting a lot
with tools and frameworks and the general lack of documentation for all of
this. I can't recommend it for that reason. However, if you can deal with
that, there are some clear advantages like having a proper IDE with advanced
refactoring, autocomplete, and other modern features. Additionally the Kotlin
language has a lot of nice features relative to typescript.

2\. kotlin native will come out of beta; probably with 1.4. It's very clear
that Jetbrains is trying to establish Kotlin as a solid cross platform
language for mobile development. Apple is pursuing a similar strategy with
Swift.

3\. Multi platform kotlin libraries are about to become a thing. These are
libraries that look and feel the same whether you use the jvm, js, or native
compiler and wrap/proxy platform specific functionality where appropriate.
Having multi platform libraries for things like dealing with IO, Json
serialization, HTTP, etc. means you can have cross platform kotlin code bases
that compile for multiple platforms. Currently this stuff is a bit in flux but
when this stabilizes, I expect a lot more libraries to start popping up on
Github.

4\. Kotlin native also means WASM support is going to be there as well
(basically Kotlin native uses llvm and can target anything llvm can target).
With WASI and other interesting things happening in that space and e.g. things
like garbage collection inching closer to being standardized in browsers,
Kotlin becomes a solid language for targeting this as well and maybe a nice
alternative for people for whom rust is a bit too alien/hard right now.

5) All of the above means that Kotlin is going to start becoming a more viable
choice in a lot of places where it is currently not an obvious choice: server-
less computing, browsers, desktop software, command line tooling, etc. Also it
means attention will shift to doing things the Kotlin way.

So, while Dukat is nice for integrating legacy typescript libraries, it's
going to be more interesting to utilize multi platform kotlin libraries
instead. Also transpiling to js becomes kind of unnecessary if you don't need
javascript libraries and can use WASM instead via kotlin-native.

