The Expression problem
In this talk it tried to shed light on a problem that everyone of us has encountered in some form: the expression problem.
The expression problem deals with the question of how data types and their associated operation can be kept open for later extension in the context of statically typed languages. Many different strategies have been described to solve or circumvent this issue both on an architectural and language level. Finally-Tagless and object algebras are the first complete solutions which do not require any advanced language features in order solve this problem. In this talk I introduced the expression problem itself and showed that it can be observed nearly everywhere in programming. Finally, we will discussed the advantages and disadvantages of using Finally-Tagless and object algebras and how to deal with their shortcomings.
Interesting observation: In Scala Finally-Tagless and object algebras are surprisingly similar. Also I use Dotty in this presentation. My initial intend was to use its better type-system, but it was that useful, everything type related can be translated to Scala 2. Surprisingly the new extension methods made the code much more readable and shorted.
Addendum: I learned later on, that the Scala community at large uses Finally-Tagless differently than the original authors intended.