Designing a DSL with Kotlin

By Nicolas Frankel

Elevator Pitch

In some particular cases, providing a DSL can greatly improve the productivity of your dev team. Java is not the best language to provide such DSL. But Kotlin has tons of features that can help you there.


Kotlin is one of those “new” JVM languages that are currently rocking the boat. Although it’s made a great impact on Android, it’s equally good on the server side. As Domain-Specific Languages are constrained by the language they run on, Kotlin frees developers from Java fluent builders to propose something better.

Using the Vaadin web framework as an example, I’ll demo how one could design its own DSL with Kotlin.