Notes from the Kotlin Native Frontier
(Crosspost from medium.com/@kpgalligan)
Obviously, the Android community has been talking quite a bit about Kotlin. I won’t get into that. It’s cool, but let’s call it well handled by others. I’m going to talk about what’s showing up in the Kotlin/Native samples folder!
My particular career focus has shifted dramatically in the past 1–2 years and is pretty much on code sharing and how we’ll be pushing pixels for the next decade (ish). I don’t know exactly how things will shake out, but we’re talking to a lot of people who are trying different ways to not build the same thing over and over again.
We have built Doppl. It’s a mobile code sharing tool. It is interesting now because it’s available now, and will fit well into a lot of contexts. It’ll be a bit, but you will be able to code Android, JS, iOS, and apparently sooner than I thought, webassembly, with Kotlin code. If we had a current “focus”, those two would be it.
We’ll save the “yeah, but what about ____?!” discussions for later. Assume there will be multiple “things”, and not everybody is going to agree with you. That’s how people work.
I’m speaking at a Swift conference in November, and my talk is basically saying the web and Android communities are working on their answer for other screens. The Swift community should do the same.
This sample is not what I’d call “practical”. You can’t use this today. However, it’s the first Webassembly thing I’ve ever built (I just built the sample, and did a little Kotlin tweaking to make sure it actually worked).
It takes a while to load. Like I said. Not practical today, but assuming you’re on Chrome, this works (haven’t tried other browsers).
Kotlin Native can “mount” Objective-C headers for interop. The sample compiles and runs on iOS, which is cool, but hopefully, for you can build a separate library that can be referenced from Swift, etc. I keep advocating this because I think it’ll be very important for adoption.
This is all very neat stuff! It’ll be a while before the tooling allows you to be productive, but it’s coming.
Happy Friday! Come to Droidcon SF!