Hi, I'm new to Kotlin and am having a hard time un...
# getting-started
a
Hi, I'm new to Kotlin and am having a hard time understanding the various target platforms Kotlin has: • JVM • JS • Kotlin/Native How are these different, and what is common to all of them?
j
You can tack a look at this simple mpp project https://github.com/benasher44/uuid. It is bringing UUID to the different targets. In short common holds the generic code. The targets the platform specific one.
a
@Jochen Guck Thank you for replying I was kinda hoping for a 2-3 line response. Just to get a very high level perspective on why we need separate target platforms.
j
For cross platform programming. You can reuses al common code on all platforms (e.g. android, ios, jvm, ...). Or access platform specific topics in a generic way (e.g. Bluetooth, Sockets, ... )
1
💡 1
a
Thanks, that helps!