Programming Languages

Invited Lecture on Effect Handlers

Jonathan Brachthäuser
Alumni
Jonathan Brachthäuser
is in­vited to give a guest lec­ture at the Mod­ern Pro­gram­ming Lan­guages sem­i­nar, or­ga­nized by the Cu­sanuswerk spon­sor­ship or­ga­ni­za­tion.

Ab­stract

Ef­fects are all around us: promi­ment ex­am­ples of (con­trol) ef­fects in­clude de­pen­den­cies on con­fig­u­ra­tion or other mod­ules, ex­cep­tional con­trol flow, asyn­chro­nous calls to re­mote APIs, non­de­ter­min­ism, prob­a­bil­isitic con­trol flow and many more. Ef­fect han­dlers are a promis­ing way to struc­ture ef­fect­ful pro­grams in a mod­u­lar way. In this lec­ture, I pre­sent the Scala li­brary Ef­fekt, which makes use of both the func­tional and ob­ject ori­ented fea­tures of Scala. In par­tic­u­lar, we fol­low FP best prac­tices and make the use of ef­fects ex­plicit in the type of a pro­gram. We also fol­low OO best prac­tices and sep­a­rate the ef­fects into in­ter­faces, pro­grams using the in­ter­faces and im­ple­men­ta­tions of those in­ter­faces. Using Scala’s fea­tures of in­ter­sec­tion types, trait/mixin-com­po­si­tion, im­plicit pa­ra­me­ter pass­ing and first class mod­ules (as ob­jects), Ef­fekt of­fers in­ter­est­ing ex­ten­si­bil­ity prop­er­ties.

Fur­ther In­for­ma­tion