Skip to content
This repository has been archived by the owner on Apr 19, 2020. It is now read-only.
/ joyquote Public archive

A tutorial on how to embed subset of Joy into Scala via extensible string interpolation and macros

License

Notifications You must be signed in to change notification settings

densh/joyquote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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 available as a plain pdf.

About

A tutorial on how to embed subset of Joy into Scala via extensible string interpolation and macros

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages