Mark Hopkins

Share

Software Developer at Commonwealth Bank
speakerdeck.com/mjhopkins
@antiselfdual

Mark has a doctorate in algebra and likes cats, categories and good coffee.

YOW! Lambda Jam 2016 Brisbane

Stop Paying for Free Monads

TALK –  VIEW SLIDES WATCH VIDEO

Free monads, as used in the “Datatypes à la carte” pattern, are a useful way to structure code, separating of specification from implementation and enabling modularisation.

But they also come with a runtime performance penalty.

The complementary “typed tagless final interpreters” approach (popularised in the Haskell and OCaml worlds by Oleg Kiselyov) offers a performance boost over free monads, yet available sample code centers around simple expression langauges, and “real world” examples are hard to come by.

In this talk, we’ll compare and contrast the TTFI approach with Datatypes à la carte and explore how it can be used in real production code — with configuration, state, side effects and error handling.


Stop Paying for Free Monads

WORKSHOP/JAM

Free monads, as used in the “Datatypes à la carte” pattern, are a useful way to structure code, separating of specification from implementation and enabling modularisation.

But they also come with a runtime performance penalty.

The complementary “typed tagless final interpreters” approach (popularised in the Haskell and OCaml worlds by Oleg Kiselyov) offers a performance boost over free monads, yet available sample code centers around simple expression langauges, and “real world” examples are hard to come by.

In this workshop, we’ll compare and contrast the TTFI approach with Datatypes à la carte and explore how it can be used in real production code — with configuration, state, side effects and error handling.

Pre-requisites:

  • Internet Connection ( Venue and YOW! will NOT provide internet connection during workshops)