Anton Arhipov

Anton Arhipov

Anton is a Developer Advocate at JetBrains. Working with TeamCity and IntelliJ IDEA. Programming in Java and Kotlin. Professional interests includeprogramming languages and developer tooling. Co-organizer of DevClub.eu, a local developers community in Tallinn.

Building DSLs in Kotlin

Friday, September 27 – Day 2 - 13:00 - Room 3

Learn how to create type-safe and statically typed DSLs in Kotlin. Uncover the language features that makes DSL creation possible. We’ll take a look at a few practical examples and create a simple DSL ourselves.

As Kotlin programming language is getting more popular, the creators of the libraries are starting to provide Kotlin API for their frameworks. The number of libraries that provide a nice little DSL grows constantly. The session introduces you to some of those libraries and explains, how Kotlin makes creating the DSL so simple. Lambdas, extension methods, lambdaswith the receiver, and other syntactic sugar make it easy to implement DSL in Kotlin. In a live coding demo, we will create a simple DSL for the existing Java classes that could be used from a Kotlin code.