You have to brew install kotlin for this to work of course. But it's a great way for using a lot of Java stuff as well. Kotlin's Java interoperability is excellent if you are using Java from Kotlin.
IMHO Kotlin is underused as an alternative to python currently for data science stuff. It's surprisingly capable out of the box even with just the standard library and there are a lot of nice data science libraries that make it more useful. Not for everyone; but fairly easy to get started with.
Kotlin scripting is unfortunately not necessarily very user friendly (e.g. imports can be a bit tedious and IDE support is a bit meh). But it can be a nice way to embed some kotlin stuff in a script. Generally, Jetbrains could give this topic a lot more love and attention and it wouldn't even take that much to level up the experience.
KTS works in jupyter as well (there is a kotlin engine for that). And that of course is nice if you want to use Java libraries in jupyter. And developing kotlin DSLs for stuff and then using them in a script is kind of a power move.
> Kotlin scripting is unfortunately not necessarily very user friendly (e.g. imports can be a bit tedious and IDE support is a bit meh). But it can be a nice way to embed some kotlin stuff in a script. Generally, Jetbrains could give this topic a lot more love and attention and it wouldn't even take that much to level up the experience.
Kotlin has been pretty bad at scripting and REPL, and unfortunately the team decided to drop both:
Based on that page, they're dropping the REPL in favor of notebooks, but their're not dropping scripts. They are dropping some script-related functionality to focus on others.
Yes, they are not dropping scripts completely, at least because of Gradle, but they are removing some parts of scripting support and advise against using Kotlin for scripting. And I would prefer a true command line REPL instead of the notebooks. IIRC they were promising various improvements in both scripting and REPL for several years, and now they just gave up, I guess because of shifting the focus to K2 and KMP. I find this quite disappointing.
Also worth noting that notebooks and kts overlap quite a bit. They use the same mechanism for imports and defining remote repositories, for example. A notebook is effectively a kts script. And of course gradle uses kts as well for its Kotlin dialect. These things actually overlap quite a bit.
IMHO Kotlin is underused as an alternative to python currently for data science stuff. It's surprisingly capable out of the box even with just the standard library and there are a lot of nice data science libraries that make it more useful. Not for everyone; but fairly easy to get started with.
Kotlin scripting is unfortunately not necessarily very user friendly (e.g. imports can be a bit tedious and IDE support is a bit meh). But it can be a nice way to embed some kotlin stuff in a script. Generally, Jetbrains could give this topic a lot more love and attention and it wouldn't even take that much to level up the experience.
KTS works in jupyter as well (there is a kotlin engine for that). And that of course is nice if you want to use Java libraries in jupyter. And developing kotlin DSLs for stuff and then using them in a script is kind of a power move.