Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 2.44 KB

README.md

File metadata and controls

27 lines (18 loc) · 2.44 KB

Tagless-final, or abstraction without guilt

This repository offers an introduction to the tagless-final approach, as well as a comparison with alternative approaches - the MTL style, in particular. The introduction is largely based on the following two papers:

The material is structured around a number of variations on a theme of Language-Integrated Query. In particular, we will focus on six different ways to perform a query in Scala over a relational database:

Each variation exposes the solution to the problem, and both its advantages and disadvantages. These are mainly framed in the trade-offs between modularity and efficiency conveyed by the use of the different techniques. Tagless-final is presented as one of the techniques to achieve abstraction, without sacrifying efficiency.

Set-up

Throughout this introduction, we will play with the world database used in the documentation of doobie, a most convenient JDBC wrapper for Scala. You can find instructions here for the set-up of a postgres database server and the installation of the world database. The script common.sc contains several utilities as well as a ready-to-use doobie transactor for issuing SQL queries to the world database.

Presentations