Functional Programming Strategies

Subscribe
Archives
April 8, 2025

Tagless Final Chapter is Live

Hello!

I've hit a significant milestone on the book: the chapter on tagless final is ready and you can read it online. This was an important chapter for me. I think tagless final is one of the most useful programming strategies—I use it extensively in my own open source libraries—but I also think it is almost always misused. In addition to explaining tagless final, the chapter gives a new encoding in Scala that is much easier to use. If you write tagless final in Scala I think you'll want to read this.

Writing this chapter was helped by presenting a talk on this topic at Scalar, which gave me an audience to test the material. With the book I'm using Scala to illustrate ideas, but I'm trying not to make it Scala specific. At Scalar I could include a bit more on the Scala specific implications of tagless final, such as the largely pointless abstraction over effect types that I often see. I may go back and include some of this in the book. Let me know what you think.

There are only a few chapters of content left to write, though that isn't the end of the process. My (very optimistic) goal is to complete the book by Scala Days in August. We'll see.

Thanks to everyone who has supported me as a Github sponsor, submitted a PR or raised an issue on the book (I'm dealing with those as I have time), or shared a few words of encouragement. It's been a long journey, but with your help I'm getting there.

Regards,
Noel

P.S.: The slides from my talk at Imperial are also online. This talk was all about dualities, which is one of the main themes of the book.

Don't miss what's next. Subscribe to Functional Programming Strategies:
Powered by Buttondown, the easiest way to start and grow your newsletter.