Kotlin Tutorial – Quick Reference – Getting Started with Kotlin

Kotlin Tutorial – Quick Reference – Getting Started with Kotlin

Introduction Disclaimer: This reference has originally been published as a DZone Refcard. Kotlin has become one of the most popular JVM languages in the past few months. One special reason is that it experienced a lot of attention in the Android community after Google made Kotlin an official language for Android development. Kotlin is being …

Read More Read More

The Power of Gradle Kotlin DSL

The Power of Gradle Kotlin DSL

-The following is based on Gradle 4.3.1- A few weeks ago I started migrating most of my Groovy-based gradle.build scripts to Kotlin-backed gradle.build.kts scripts using the Kotlin DSL. Why would I do that? Kotlin is my language of choice and I love the idea of using a single language to do all my work. I …

Read More Read More

Web Applications with Kotlin ktor

Web Applications with Kotlin ktor

Introduction Disclaimer: This ktor article was originally published in the Dzone Web Development Guide, which can be downloaded here. When Google made Kotlin an official language for Android a few months ago at Google I/O, the language gained a lot of popularity in the Android world quickly. On the server side though, Kotlin is not …

Read More Read More

Kotlin Reified Types in Inline Functions

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 …

Read More Read More

Create a DSL in Kotlin

Create a DSL in Kotlin

Kotlin as a programming language provides some very powerful features, which allow the creation of custom internal Domain Specific Languages (DSL).  One of these features, I also wrote about on this blog, is called Function Literals with Receiver, others are the invoke convention or infix notation. In this article, I will show how to create …

Read More Read More

Kotlin Operator Overloading – Working by Convention

Kotlin Operator Overloading – Working by Convention

Kotlin Operator Overloading and Conventions 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: Kotlin Operator Overloading. In this article, I want to show you which conventions you can use and I …

Read More Read More

Kotlin Coroutines Guide – Concurrent Programming in Kotlin

Kotlin Coroutines Guide – Concurrent Programming in Kotlin

updated 10/29/2018 Introduction and Motivation In this article, you will learn about Kotlin Coroutines: What they are, what they look like, and how they work. The demonstrated code examples were tested with Kotlin 1.3.0 and kotlinx.coroutines 1.0.0. Kotlin coroutines are one of the “bigger features” as indicated by the following quote, taken from JetBrains’ blog: …

Read More Read More

Kotlin Function Literals with Receiver – Quick Introduction

Kotlin Function Literals with Receiver – Quick Introduction

Kotlin Function Literals with Receiver – The Foundation for DSLs and many Library Functions Today I want to give a quick introduction to Kotlin 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, Kotlin’s standard library includes many functions which …

Read More Read More