Teaching Domain Specific Languages in Scala

Venue: Scala Days Seattle 2023

Date: 6 June 2023

Abstract

In 2017, I was asked to teach a small, 3 credits master course on engineering domain specific languages. At the time I was already a Scala enthusiast, and I had no doubt that it would have been the best language to teach this course. While learning about DSL, students are introduced to the basics like functional domain modeling, parser combinators, extension and symbolic-named methods, but also advanced topics like metaprogramming, and how to implement programming language features in Visual Studio Code (using Scala.js).

After a brief introduction on DSLs and the context where I teach them, the talk will focus on two main areas:

  • Why Scala is suitable for internal and external DSL development, i.e., what are the characteristics of the language, the platforms, and the libraries in the community that make it amazing to teach (and engineer) DSLs.
  • How to structure a course and what are the possible topics and areas to cover, including how to design compelling assignments where students build software inspired by real DSLs.

The talk will include examples of what the best students were able to achieve. Furthermore, I will pinpoint controversial aspects concerning the actual state of the language, libraries, and tools that are connected to DSL development, and debunk a few misconceptions around DSLs that made them a little unpopular in the Scala world.

Recording

My talk at ScalaDays 2023
Fall 2026 Course

Engineering of Domain-Specific Languages

Domain-Specific Languages (DSLs) are programming languages that are tailored to a particular application domain. This essential focus of DSLs allows one to write more concise and understandable programs, with tight stakeholder integration, and, when done properly, to improve code quality. The course will feature the current state of the art in both the design and implementation of DSLs. The course will emphasize the different design dimensions of DSLs, the involved language paradigms and features, and the drawbacks with respect to simple API modeling.


Teaching Domain Specific Languages in Scala

6 June 2023 Developer Talk