Switch Theme

Kotlin is the Best

dev

6/7/2024

1 min. read

My favorite programming language is probably Kotlin, and it’s not even close. The language just seems so elegant, yet so powerful and ambitious. You know how people say you can do anything in JavaScript? For me, it feels like Kotlin is that language.

fun main() {
    println("Hello World!")
}

Reason #1: JVM

Probably the first reason why I even discovered Kotlin in the first place was because it is an alternative to Java, which I use(d) for Minecraft modding. Kotlin’s full interoperability with Java allowed me to fully immerse myself with the language. I pick up things pretty quickly, and with Kotlin’s great documentation, I built PlasmaEnchants and BattleCards in a matter of days (if you don’t count my procrastination).

Reason #2: Syntax

Since I started in JS in 2019-2020, I’ve always liked the brackets-based syntax. It’s why I never really like Python, even though I’ve used in for a few projects. Kotlin fitted this in nicely. It’s also less boilerplate for me to type, even though I don’t mind now that we have Copilot.

In addition, I sometimes put semicolons, and sometimes don’t. Usually depends on what I was previously doing, like Python, Java, or even JS. Kotlin doesn’t care, and I love that.

Reason #3: Transpile

Kotlin is one of the few languages I know that can transpile to multiple languages. Kotlin/JVM is one thing, but Kotlin/JS gave me so many different ideas for projects. JavaScript has a billion different sub-languages and frameworks that can all literally be used in Kotlin (if you try hard enough). Kotlin/Native sealed the deal with allowing you to use any native library as well. This means that, if you think about it long enough, Kotlin interops with literally everything.

Conclusion

Short story about why I like Kotlin, since I was thinking about it staring at my phone case. Not much else to write. Going to go back to playing Minecraft now.