I have a friend who has Windows 10 on his laptop. He probably has Java installed but he may not. If I create a Java app & he doesn’t have Java installed, he won’t be able to run the app. But, if I use Kotlin Native & can create a Windows app then he can run the app without having Java installed. Sure, the app that I create probably won’t run as efficiently as a native Windows app.
That’s why Kotlin Native intrigues me so much.
I don’t want to own both a Windows laptop & a Mac.
“Peak performance is the same.”
Definitely not. On medium memory intensive tasks it is slower like 500%.
“Kotlin standard library is enough for most things.”
Definitely not. Well, maybe for school things, but not for professional stuff. (eg. no file system support, no json/xml processing). And CInterop is sooo much fun to use, compared to jre library with all stuff ready to use.
“I have not checked”
If you don’t have knowledge on the subject, don’t talk about the subject.
@TC@darksnake just out of curiosity, why wouldn’t you recommend using Kotlin Native? I guess because of it’s early stage? Or are there any major red flags?
I am asking because I am using Kotlin Native since a few months and had nothing but a pleasant experience so far, CInterop works really great and it didn’t felt that slow. The lacking of 3rd party libraries is of course a bummer, but regarding the early stage I didn’t expect a huge set of libraries.
I do not recommend using Kotlin-Native on the desktop because it does not solve any problems Kotlin-JVM does not solve (save for slow start). And Kotlin-JVM is muuuch better. So it is just a comparison of a nice tool with a great tool.
The JVM is a great developer experience and is easier than many other platforms. Trying to avoid it, especially in the name of an easier development experience, will be challenging.
If you’re new to programming, start with tutorials and write one program at a time. At this point, you do not need to optimize which tool does what compiling until after you’ve learned more and written several programs.
Yes, you can create standalone executables of JVM apps in several different ways besides a runnable Jar. Your real question of “will I be able to easily share and run my code with Windows?” is a clear “yes”. JVM programs are portable, easy to share, and have multiple packaging options that aren’t runnable jars (once you get to that point).