JEff: objects for effect

Effect handling is a way to structure and scope side-effects which is gaining popularity as an alternative to monads in purely functional programming languages. Languages with support for effect handling allow the programmer to define idioms for state, exception handling, asynchrony, backtracking, etc. from within the language. Functional programming languages, however, prohibit certain patterns of modularity well-known from object-oriented languages. In this paper we introduce JEff, an object-oriented programming language with native support for effect handling, to provide first answers to the question what it would mean to integrate object-oriented programming with effect handling. We illustrate how user-defined effects could benefit from interface polymorphism, and present its runtime semantics and type system.

[1]  Sam Tobin-Hochstadt,et al.  Run your research: on the effectiveness of lightweight mechanization , 2012, POPL '12.

[2]  Ohad Kammar,et al.  Handlers in action , 2013, ICFP.

[3]  Daan Leijen,et al.  Type directed compilation of row-typed algebraic effects , 2017, POPL.

[4]  Andrej Bauer,et al.  Programming with algebraic effects and handlers , 2012, J. Log. Algebraic Methods Program..

[5]  Matías Toro,et al.  Customizable gradual polymorphic effects for Scala , 2015, OOPSLA.

[6]  Oleg Kiselyov,et al.  Freer monads, more extensible effects , 2015, Haskell.

[7]  Apostolos Syropoulos,et al.  Steps in Scala: The expression problem , 2010 .

[8]  Daniel Marino,et al.  A generic type-and-effect system , 2009, TLDI '09.

[9]  Jonathan Immanuel Brachthäuser,et al.  Effekt: extensible algebraic effects in Scala (short paper) , 2017, SCALA@SPLASH.

[10]  Tijs van der Storm,et al.  Modular interpreters with implicit context propagation , 2017, Comput. Lang. Syst. Struct..

[11]  Conor McBride,et al.  Do be do be do , 2017, POPL.

[12]  Éric Tanter,et al.  A theory of gradual effect systems , 2014, ICFP.

[13]  Amr Sabry,et al.  Extensible effects: an alternative to monad transformers , 2013, Haskell '13.

[14]  Davide Ancona,et al.  A core calculus for Java exceptions , 2001, OOPSLA '01.

[15]  Martin Odersky,et al.  Lightweight Polymorphic Effects , 2012, ECOOP.

[16]  Matthias Felleisen,et al.  A Syntactic Approach to Type Soundness , 1994, Inf. Comput..

[17]  Tom Schrijvers,et al.  Effect handlers in scope , 2014, Haskell 2014.

[18]  Philip Wadler,et al.  Featherweight Java: a minimal core calculus for Java and GJ , 1999, OOPSLA '99.

[19]  Jonathan Aldrich,et al.  The power of interoperability: why objects are inevitable , 2013, Onward!.

[20]  Gordon D. Plotkin,et al.  Handling Algebraic Effects , 2013, Log. Methods Comput. Sci..

[21]  Gordon D. Plotkin,et al.  Handlers of Algebraic Effects , 2009, ESOP.

[22]  Eric Steegmans,et al.  Combining the robustness of checked exceptions with the flexibility of unchecked exceptions using anchored exception declarations , 2005, OOPSLA '05.

[23]  William R. Cook On understanding data abstraction, revisited , 2009, OOPSLA 2009.