Logo Crossweb

Log in

No account yet? Forgot password

Przypomnij hasło

close Wypełnij formularz.
Na Twój adres e-mail zostanie wysłane link umożliwiający zmianę hasła.
Send

Functional World #15 | Repurposing Scala's Pattern Matching for Deeply Embedded

functional-world-15-repurposing-scala-s-pattern-matching-for-deeply-embedded
Event type:
Meetup
Category:
IT
Topic:
Date:
19.02.2025 (wednesday)
Time:
18:00
Language:
English
Price:
Free
City:
Place:
Address:
nline Event
Strona www:
Description:

The upcoming meeting will focus on Scala, with a spotlight on Repurposing Scala's Pattern Matching for Deeply Embedded DSLs.


The session will be led by Tomáš Mikula, Software Developer. By day, Tomas leverages existing tools to solve business challenges, and by night, he creates innovative tools to push the boundaries of programming. His passions include functional programming, metaprogramming, and domain-specific languages (DSLs), all aimed at improving the programming experience for everyone. Tomas is also the creator of Libretto.


Talk description:

Could we reuse Scala’s linguistic features, including variable binding and pattern matching, for describing e.g. durable workflows? In particular, could we obtain a reified description of such workflows, one that we could analyze, serialize, or render graphically? Can we get nested pattern matching on user-defined domain-level ADTs?


Although Scala-Virtualized, an experimental branch of the Scala compiler, gave us means to do so a decade ago, it never made it to the mainline Scala compiler.

In this talk, I’m going to present an alternative technique to repurpose Scala’s pattern matching for deeply embedded DSLs, one that does not require changes to the compiler. Additionally, the presented library solution (from Libretto) comes with translation to point-free representation, which not only avoids the trouble of managing variable bindings, but also makes non-exhaustive pattern matches unrepresentable! And all of that without macros.


The technique is used in the Libretto project for pattern matching on domain-level ADTs. However, I am going to demonstrate it on a simpler, demo DSL for defining durable workflows. Thus, as a bonus, attendees will get an unorthodox approach to durable workflows that’s not based on replaying the event log.

Profile of employers

Similar events