Software Engineering

What You See Is What You Get: Practical Effect Handlers in Capability-Passing Style

by Jonathan Im­manuel Brachthäuser

In Ernst Den­ert Award for Soft­ware En­gi­neer­ing 2020. Springer In­ter­na­tional Pub­lish­ing, 2022.

This pub­li­ca­tion is re­lated to the Lex­i­cal Ef­fect Han­dlers re­search pro­ject.

Ab­stract

Struc­tur­ing con­trol flow is an es­sen­tial task al­most every pro­gram­mer faces on a daily basis. At the same time, the con­trol flow of soft­ware ap­pli­ca­tions is be­com­ing in­creas­ingly com­pli­cated, mo­ti­vat­ing lan­guages to in­clude more and more fea­tures like asyn­chro­nous pro­gram­ming and gen­er­a­tors. Ef­fect han­dlers are a promis­ing al­ter­na­tive since they can ex­press many of these fea­tures as li­braries. To bring ef­fect han­dlers closer to the soft­ware en­gi­neer­ing prac­tice, we pre­sent ca­pa­bil­ity pass­ing as an im­ple­men­ta­tion tech­nique for ef­fect han­dlers. Ca­pa­bil­ity pass­ing pro­vides the basis for the in­te­gra­tion of ef­fect han­dlers into main-stream ob­ject-ori­ented pro­gram­ming lan­guages and thereby un­locks novel mod­u­lar­iza­tion strate­gies. It also en­ables pro­gram­mers to apply lex­i­cal rea­son­ing about ef­fects and gives rise to a new form of ef­fect poly­mor­phism. Fi­nally, it paves the path for ef­fi­cient com­pi­la­tion strate­gies of con­trol ef­fects.