Kotlin Inline Classes – How they work and when you should use them

Kotlin Inline Classes – How they work and when you should use them

Kotlin, Software Development
Kotlin Inline Classes - How they work and when you should use them Kotlin introduced inline classes with version 1.3 as an experimental feature. You should be aware that their implementation can still change in future releases, but it's already a great time to learn about them now. Inline classes add a simple tool we can use to wrap some other type without adding runtime overhead through additional heap allocations. In this article, we want to see how inline classes in Kotlin work and when it makes sense to use them. Enable inline classes in your project To enable inline classes in your project, you simply need to work with Kotlin version > 1.3 which adds the inline keyword to the language. Since inline classes are still experimental, your IDE…
Read More
How Kotlin makes me a more productive software developer

How Kotlin makes me a more productive software developer

Functional Programming, Java, Kotlin, Software Development
How Kotlin makes me a more productive software developer I've been writing JVM code for more than seven years now, and I did so mainly using Java. This changed about two years ago when I picked up Kotlin. By now, I managed to drop the Java language more-or-less entirely in favor of Kotlin. I did this because I feel much more productive with the language. It lets me focus more on the business logic rather than forcing me to write boilerplate code over and over again. In this post, I tell you how Kotlin makes me a more productive developer. I certainly know Kotlin much better than I ever knew Java. FWIW, I had been certified as a Java expert by Oracle some years back. Still, Kotlin became my native…
Read More
Kotlin on the JVM – Bytecode Generation

Kotlin on the JVM – Bytecode Generation

Functional Programming, Kotlin, Software Development
Kotlin on the JVM - How can it provide so many features? Introduction What exactly is a "JVM language", what is Kotlin? Isn’t only Java meant to run on the JVM? Kotlin provides many features that aren’t available in Java such as proper function types, extension functions and data classes. How is this even possible? I’ve taken a deeper look at how Kotlin works under the hood and what "JVM language" actually means. We'll be having a look at Kotlin's bytecode generation. If you also thought about these things already, this article should bring some light into the darkness :) For a more detailed introduction to Kotlin’s features you can have a look at my Getting Started Guide. (more…)
Read More
Setup Vert.x Application written in Kotlin with Gradle – Kotlin Reactive Programming

Setup Vert.x Application written in Kotlin with Gradle – Kotlin Reactive Programming

Java, Kotlin, Software Development
I decided to write a Vert.x application in combination with Kotlin in a simple example because I’m really interested in Reactive Programming and love to use Kotlin. In this post, I will give some basic information on Vert.x as a tool set for writing reactive applications on the JVM and also introduce Kotlin a bit. In the end, I want to demonstrate how this application can be set up in Gradle. (more…)
Read More