A tutorial on how to embed subset of Joy into Scala via extensible string interpolation and macros
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Embedding Joy into Scala

This tutorial is going to provide a step-by-step tutorial on how to embed a subset of Joy programming language into Scala via a combination of extensible string interpolation, macros, typeclasses and Scala's extensible pattern matching.

The Joy was chosen as an example of small language that won't complicate demonstration of core ideas used to implement custom quotations. The same technique can be used to embed any other language too. For example quasiquotes introduced in Scala 2.11 are implemented in very similar fashion.

To start the tutorial open the list of commits in the master branch of this repo.

It is based on my "Quote or be quoted" talk given on ScalaDays'14. Slides from the talk are also available as a plain pdf.