Kotlin Reified Types in Inline Functions

Kotlin Reified Types in Inline Functions

I’ve noticed that many people haven’t ever heard of reified types or have problems understanding what they are, and what they do. Therefore this little post is intended to bring some light into the darkness of Kotlin’s reified types. Starting situation fun <T> myGenericFun(c: Class<T>) In an ordinary generic function like myGenericFun you can’t access …

Read More Read More

Spring WebFlux with Kotlin – Reactive Web

Spring WebFlux with Kotlin – Reactive Web

Spring – even more fancy As you might most certainly know, I’m one of these Kotlin “hipsters”, who’s really loving the language and wouldn’t write any more Java, if it was that easy. If you’re not familiar with my articles, have a look at the other Kotlin related posts here.

Creating DSL with Kotlin – Introducing a TLSLibrary

Creating DSL with Kotlin – Introducing a TLSLibrary

Creating DSL with Kotlin Introducing a TLSLibrary Motivation If you’ve been following my recent posts about Kotlin, you’ve probably noticed me mentioning Domain Specific Languages (DSL) already. Kotlin as a programming language provides some powerful features that allow us to create those DSLs. One of these features, I also already introduced, is called Function Literals with …

Read More Read More

Kotlin Conventions – Operator Overloading

Kotlin Conventions – Operator Overloading

Operator Overloading and Conventions in Kotlin Introduction Kotlin supports a technique called conventions, everyone should be familiar with. For example, if you define a special method plus in your class, you can use the + operator by convention. In this article I want to show you which conventions can be used and will provide some …

Read More Read More

Kotlin Coroutines Guide

Kotlin Coroutines Guide

Approaching Kotlin Coroutines – An Extensive Feature Concurrent Programming in Kotlin Introduction and Motivation As already advertised on Twitter a few days ago, I was planning to run the rule over Kotlin Coroutines, which I actually did. Unfortunately, this took me longer than first expected because coroutines are huge, especially if you’re not yet familiar with …

Read More Read More

Kotlin Function Literals with Receiver – Quick Introduction

Kotlin Function Literals with Receiver – Quick Introduction

Function Literals with Receiver – The Foundation for DSLs and many Library Functions Today I want to give a quick introduction to Function Literals with Receiver. This concept is what makes Kotlin great for designing Domain Specific Languages as we know it from Groovy for example. Also, Kotlins standard library includes many functions which many of you …

Read More Read More

Kotlin on the JVM – Bytecode Generation

Kotlin on the JVM – Bytecode Generation

Kotlin on the JVM – How can it provide so many features? Introduction What exactly is a “JVM language”? Isn’t only Java meant to be run on the JVM? Kotlin provides many features that aren’t available in Java such as a proper function type, extension functions or data classes. How was this even achievable? I’ve taken a …

Read More Read More

Sealed Classes in Kotlin – An Explanation

Sealed Classes in Kotlin – An Explanation

Sealed Classes in Kotlin – An Explanation Today I came across Sealed Classes in Kotlin, which I had never heard of before. After some research I found that this concept is nothing new and is also available in Scala for example. So, yet another Scala feature JetBrains considered relevant and suitable for Kotlin? I like that 🙂 …

Read More Read More

Generic Types and Variance in Kotlin compared to Java

Generic Types and Variance in Kotlin compared to Java

Basics – What is Variance? Many programming languages support the concept of subtyping, which allows us to implement hierarchies like “A Cat IS-An Animal“. In Java we can either use the extends keyword in order to change/expand behaviour of an existing class (inheritance) or use implements to provide implementations for an interface. According to Liskov’s substitution principle, …

Read More Read More

Setup Vert.x Application written in Kotlin (Gradle Build)

Setup Vert.x Application written in Kotlin (Gradle Build)

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. This post will give some basic information on Vert.x as a tool set for writing reactive applications on the JVM as well as a few words on Kotlin. In the end, I want to demonstrate …

Read More Read More