Lightweight language support for type-based, concurrent event processing

Presented at Scala Workshop 2010, Lausanne, Switzerland, April 15, 2010.
Philipp Haller


Many concurrent applications are structured around typebased event handling. Scala provides a library for eventbased actors, which allows common idioms to be expressed in a concise and intuitive way. However, innocent-looking programs can exhibit catastrophic performance under certain conditions. In this paper, we introduce translucent functions, a type-based refinement of Scala’s pattern-matching functions. Translucent functions additionally provide the runtime types of classes that identify disjoint cases in a pattern. We show how this additional type information can be used to optimize actors as well as a form of join-style synchronization.