Workshop Icon
WORKSHOPS

Crafting Elegant DSLs in Kotlin

DSL, Kotlin

Max. Attendees: 30

What attendees will learn

Type safe builders, or DSLs (Domain-Specific Languages), allow us to describe complex logic in a readable and elegant way. Kotlin is an excellent language for building DSLs, offering features specifically designed with DSL construction in mind. This workshop explores the key techniques required to build such DSLs, and together we'll create a production-worthy example.

Requirements

Familiarity with Kotlin or similar mixed FP/OOP languages -- including Scala, Java, or C#. It would be useful for attendees to have a copy of IntelliJ IDEA installed (the Community edition is enough).

Agenda

  • Scope management: extension function, lambdas with receivers, context parameters
  • Using generics for improved type safety
  • @DslMarker for scope control
  • (If time allows) Nicer syntax using suspend
Companies using this technology

Quite a lot, on both server-sideand frontend projects.

Target audience roles

Developers using or aiming to introduce functional patterns into their existing codebases.

Canela Workshop

€40

Free registration for general ticket holders