{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,3,26]],"date-time":"2025-03-26T02:49:25Z","timestamp":1742957365393,"version":"3.40.3"},"publisher-location":"Cham","reference-count":60,"publisher":"Springer International Publishing","isbn-type":[{"type":"print","value":"9783030831271"},{"type":"electronic","value":"9783030831288"}],"license":[{"start":{"date-parts":[[2022,1,1]],"date-time":"2022-01-01T00:00:00Z","timestamp":1640995200000},"content-version":"tdm","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"},{"start":{"date-parts":[[2022,1,1]],"date-time":"2022-01-01T00:00:00Z","timestamp":1640995200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"}],"funder":[{"name":"Gesellschaft f\u00fcr Informatik e.V."}],"content-domain":{"domain":["link.springer.com"],"crossmark-restriction":false},"short-container-title":[],"published-print":{"date-parts":[[2022]]},"abstract":"<jats:title>Abstract<\/jats:title><jats:p>Structuring control flow is an essential task almost every programmer faces on a daily basis. At the same time, the control flow of software applications is becoming increasingly complicated, motivating languages to include more and more features like asynchronous programming and generators. Effect handlers are a promising alternative since they can express many of these features as libraries. To bring effect handlers closer to the software engineering practice, we present <jats:italic>capability passing<\/jats:italic> as an implementation technique for effect handlers. Capability passing provides the basis for the integration of effect handlers into mainstream object-oriented programming languages and thereby unlocks novel modularization strategies. It also enables programmers to apply lexical reasoning about effects and gives rise to a new form of effect polymorphism. Finally, it paves the path for efficient compilation strategies of control effects.<\/jats:p>","DOI":"10.1007\/978-3-030-83128-8_3","type":"book-chapter","created":{"date-parts":[[2022,2,28]],"date-time":"2022-02-28T13:03:03Z","timestamp":1646053383000},"page":"15-43","update-policy":"https:\/\/doi.org\/10.1007\/springer_crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["What You See Is What You Get: Practical Effect Handlers in Capability-Passing Style"],"prefix":"10.1007","author":[{"given":"Jonathan Immanuel","family":"Brachth\u00e4user","sequence":"first","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"297","published-online":{"date-parts":[[2022,2,28]]},"reference":[{"key":"3_CR1","doi-asserted-by":"crossref","unstructured":"Ahman, D., Pretnar, M.: Asynchronous effects. Proc. ACM Program. Lang. 5(POPL) (2021). https:\/\/doi.org\/10.1145\/3434305","DOI":"10.1145\/3434305"},{"key":"3_CR2","doi-asserted-by":"crossref","unstructured":"Bauer, A., Pretnar, M.: An effect system for algebraic effects and handlers. In: International Conference on Algebra and Coalgebra in Computer Science, pp. 1\u201316. Springer, Berlin, Heidelberg (2013)","DOI":"10.1007\/978-3-642-40206-7_1"},{"issue":"1","key":"3_CR3","doi-asserted-by":"publisher","first-page":"108","DOI":"10.1016\/j.jlamp.2014.02.001","volume":"84","author":"A Bauer","year":"2015","unstructured":"Bauer, A., Pretnar, M.: Programming with algebraic effects and handlers. J. Logical Algebraic Methods Program. 84(1), 108\u2013123 (2015)","journal-title":"J. Logical Algebraic Methods Program."},{"key":"3_CR4","doi-asserted-by":"crossref","unstructured":"Biernacki, D., Pir\u00f3g, M., Polesiuk, P., Sieczkowski, F.: Abstracting algebraic effects. Proc. ACM Program. Lang. 3(POPL), 6:1\u20136:28 (2019)","DOI":"10.1145\/3290319"},{"key":"3_CR5","doi-asserted-by":"crossref","unstructured":"Biernacki, D., Pir\u00f3g, M., Polesiuk, P., Sieczkowski, F.: Binders by day, labels by night: effect instances via lexically scoped handlers. Proc. ACM Program. Lang. 4(POPL) (2019). https:\/\/doi.org\/10.1145\/3371116","DOI":"10.1145\/3371116"},{"key":"3_CR6","doi-asserted-by":"crossref","unstructured":"Brachth\u00e4user, J.I., Schuster, P.: Effekt: Extensible algebraic effects in Scala (short paper). In: Proceedings of the International Symposium on Scala. ACM, New York (2017). https:\/\/doi.org\/10.1145\/3136000.3136007","DOI":"10.1145\/3136000.3136007"},{"key":"3_CR7","doi-asserted-by":"crossref","unstructured":"Brachth\u00e4user, J.I., Schuster, P., Ostermann, K.: Effect handlers for the masses. Proc. ACM Program. Lang. 2(OOPSLA), 111:1\u2013111:27 (2018). https:\/\/doi.org\/10.1145\/3276481","DOI":"10.1145\/3276481"},{"key":"3_CR8","doi-asserted-by":"crossref","unstructured":"Brachth\u00e4user, J.I., Schuster, P., Ostermann, K.: Effects as capabilities: effect handlers and lightweight effect polymorphism. Proc. ACM Program. Lang. 4(OOPSLA) (2020). https:\/\/doi.org\/10.1145\/3428194","DOI":"10.1145\/3428194"},{"key":"3_CR9","doi-asserted-by":"crossref","unstructured":"Brachth\u00e4user, J.I., Schuster, P., Ostermann, K.: Effekt: capability-passing style for type- and effect-safe, extensible effect handlers in Scala. J. Funct. Program. (2020). https:\/\/doi.org\/10.1017\/S0956796820000027","DOI":"10.1017\/S0956796820000027"},{"key":"3_CR10","unstructured":"Brachth\u00e4user, J.I.: Towards naturalistic EDSLs using algebraic effects (2017). Presentation at Domain-Specific Language Design and Implementation (DSLDI)"},{"key":"3_CR11","doi-asserted-by":"publisher","unstructured":"Brachth\u00e4user, J.I.: Design and implementation of effect handlers for object-oriented programming languages. Ph.D. Thesis, University of T\u00fcbingen, Germany (2020). https:\/\/doi.org\/10.15496\/publikation-43400","DOI":"10.15496\/publikation-43400"},{"key":"3_CR12","unstructured":"Brachth\u00e4user, J.I., Leijen, D.: Programming with implicit values, functions, and control. Tech. Rep. MSR-TR-2019-7, Microsoft Research (2019)"},{"key":"3_CR13","doi-asserted-by":"crossref","unstructured":"Brady, E.: Programming and reasoning with algebraic effects and dependent types. In: Proceedings of the International Conference on Functional Programming, pp. 133\u2013144. ACM, New York (2013)","DOI":"10.1145\/2544174.2500581"},{"key":"3_CR14","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796820000039","volume":"30","author":"L Convent","year":"2020","unstructured":"Convent, L., Lindley, S., McBride, C., McLaughlin, C.: Doo bee doo bee doo. J. Funct. Program. 30, e9 (2020). https:\/\/doi.org\/10.1017\/S0956796820000039","journal-title":"J. Funct. Program."},{"key":"3_CR15","doi-asserted-by":"crossref","unstructured":"Danvy, O., Filinski, A.: Abstracting control. In: Proceedings of the Conference on LISP and Functional Programming, pp. 151\u2013160. ACM, New York (1990)","DOI":"10.1145\/91556.91622"},{"issue":"3","key":"3_CR16","doi-asserted-by":"publisher","first-page":"143","DOI":"10.1145\/365230.365252","volume":"9","author":"JB Dennis","year":"1966","unstructured":"Dennis, J.B., Van Horn, E.C.: Programming semantics for multiprogrammed computations. Commun. ACM 9(3), 143\u2013155 (1966)","journal-title":"Commun. ACM"},{"key":"3_CR17","doi-asserted-by":"crossref","unstructured":"Dolan, S., Eliopoulos, S., Hillerstr\u00f6m, D., Madhavapeddy, A., Sivaramakrishnan, K., White, L.: Concurrent system programming with effect handlers. In: Proceedings of the Symposium on Trends in Functional Programming. Springer LNCS 10788 (2017)","DOI":"10.1007\/978-3-319-89719-6_6"},{"key":"3_CR18","unstructured":"Dolan, S., Eliopoulos, S., Hillerstr\u00f6m, D., Madhavapeddy, A., Sivaramakrishnan, K., White, L.: Effectively tackling the awkward squad. In: ML Workshop (2017)"},{"key":"3_CR19","doi-asserted-by":"crossref","unstructured":"Dolan, S., Muralidharan, S., Gregg, D.: Compiler support for lightweight context switching. ACM Trans. Archit. Code Optim. 9(4), 36:1\u201336:25 (2013)","DOI":"10.1145\/2400682.2400695"},{"key":"3_CR20","unstructured":"Dolan, S., White, L., Madhavapeddy, A.: Multicore OCaml. In: OCaml Workshop (2014)"},{"key":"3_CR21","unstructured":"Dolan, S., White, L., Sivaramakrishnan, K., Yallop, J., Madhavapeddy, A.: Effective concurrency through algebraic effects. In: OCaml Workshop (2015)"},{"key":"3_CR22","doi-asserted-by":"crossref","unstructured":"Dybvig, R.K.: The development of chez scheme. In: Proceedings of the Eleventh ACM SIGPLAN International Conference on Functional Programming, ICFP \u201906, pp. 1\u201312. ACM, New York (2006). https:\/\/doi.org\/10.1145\/1159803.1159805","DOI":"10.1145\/1159803.1159805"},{"issue":"6","key":"3_CR23","doi-asserted-by":"publisher","first-page":"687","DOI":"10.1017\/S0956796807006259","volume":"17","author":"RK Dybvig","year":"2007","unstructured":"Dybvig, R.K., Peyton Jones, S.L., Sabry, A.: A monadic framework for delimited continuations. J. Funct. Program. 17(6), 687\u2013730 (2007)","journal-title":"J. Funct. Program."},{"key":"3_CR24","doi-asserted-by":"crossref","unstructured":"Fischer, M.J.: Lambda calculus schemata. In: Proceedings of ACM Conference on Proving Assertions About Programs, pp. 104\u2013109. ACM, New York (1972)","DOI":"10.1145\/942580.807077"},{"key":"3_CR25","volume-title":"The Java Language Specification","author":"J Gosling","year":"1996","unstructured":"Gosling, J., Joy, B., Steele, G.L.: The Java Language Specification. Addison-Wesley Publishing, Boston (1996)"},{"key":"3_CR26","doi-asserted-by":"crossref","unstructured":"Gunter, C.A., R\u00e9my, D., Riecke, J.G.: A generalization of exceptions and control in ML-like languages. In: Proceedings of the Conference on Functional Programming Languages and Computer Architecture, pp. 12\u201323. ACM, New York (1995)","DOI":"10.1145\/224164.224173"},{"key":"3_CR27","unstructured":"Hillerstr\u00f6m, D., Lindley, S., Atkey, B., Sivaramakrishnan, K.: Continuation passing style for effect handlers. In: Formal Structures for Computation and Deduction, LIPIcs, vol. 84. Schloss Dagstuhl\u2013Leibniz-Zentrum f\u00fcr Informatik (2017)"},{"key":"3_CR28","doi-asserted-by":"crossref","unstructured":"Inostroza, P., van der Storm, T.: JEff: Objects for effect. In: Proceedings of the 2018 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software, Onward! 2018. ACM, New York (2018)","DOI":"10.1145\/3276954.3276955"},{"key":"3_CR29","doi-asserted-by":"crossref","unstructured":"Kammar, O., Lindley, S., Oury, N.: Handlers in action. In: Proceedings of the International Conference on Functional Programming, pp. 145\u2013158. ACM, New York (2013)","DOI":"10.1145\/2544174.2500590"},{"key":"3_CR30","doi-asserted-by":"publisher","first-page":"56","DOI":"10.1016\/j.tcs.2012.02.025","volume":"435","author":"O Kiselyov","year":"2012","unstructured":"Kiselyov, O.: Delimited control in OCaml, abstractly and concretely. Theor. Comput. Sci. 435, 56\u201376 (2012)","journal-title":"Theor. Comput. Sci."},{"key":"3_CR31","doi-asserted-by":"crossref","unstructured":"Kiselyov, O., Sabry, A., Swords, C.: Extensible effects: an alternative to monad transformers. In: Proceedings of the Haskell Symposium, pp. 59\u201370. ACM, New York (2013)","DOI":"10.1145\/2578854.2503791"},{"key":"3_CR32","unstructured":"Kiselyov, O., Sivaramakrishnan, K.: Eff directly in OCaml. In: ML Workshop (2016)"},{"key":"3_CR33","doi-asserted-by":"crossref","unstructured":"Leijen, D.: Koka: Programming with row polymorphic effect types. In: Proceedings of the Workshop on Mathematically Structured Functional Programming (2014)","DOI":"10.4204\/EPTCS.153.8"},{"key":"3_CR34","unstructured":"Leijen, D.: Algebraic effects for functional programming. Tech. rep., MSR-TR-2016-29. Microsoft Research technical report (2016)"},{"key":"3_CR35","doi-asserted-by":"crossref","unstructured":"Leijen, D.: Implementing algebraic effects in C. In: Proceedings of the Asian Symposium on Programming Languages and Systems, pp. 339\u2013363. Springer, Cham (2017)","DOI":"10.1007\/978-3-319-71237-6_17"},{"key":"3_CR36","doi-asserted-by":"crossref","unstructured":"Leijen, D.: Structured asynchrony with algebraic effects. In: Proceedings of the Workshop on Type-Driven Development, pp. 16\u201329. ACM, New York (2017)","DOI":"10.1145\/3122975.3122977"},{"key":"3_CR37","doi-asserted-by":"crossref","unstructured":"Leijen, D.: Type directed compilation of row-typed algebraic effects. In: Proceedings of the Symposium on Principles of Programming Languages, pp. 486\u2013499. ACM, New York (2017)","DOI":"10.1145\/3093333.3009872"},{"key":"3_CR38","doi-asserted-by":"crossref","unstructured":"Lewis, J.R., Launchbury, J., Meijer, E., Shields, M.B.: Implicit parameters: dynamic scoping with static types. In: Proceedings of the Symposium on Principles of Programming Languages, pp. 108\u2013118. ACM, New York (2000)","DOI":"10.1145\/325694.325708"},{"issue":"4","key":"3_CR39","first-page":"114","volume":"8","author":"S Lindley","year":"2018","unstructured":"Lindley, S.: Encapsulating effects. Dagstuhl Rep. 8(4), 114\u2013118 (2018)","journal-title":"Dagstuhl Rep."},{"key":"3_CR40","doi-asserted-by":"crossref","unstructured":"Lindley, S., McBride, C., McLaughlin, C.: Do be do be do. In: Proceedings of the Symposium on Principles of Programming Languages, pp. 500\u2013514. ACM, New York (2017)","DOI":"10.1145\/3093333.3009897"},{"key":"3_CR41","doi-asserted-by":"crossref","unstructured":"Madsen, M., Lhot\u00e1k, O., Tip, F.: A model for reasoning about javascript promises. Proc. ACM Program. Lang. 1(OOPSLA) (2017). https:\/\/doi.org\/10.1145\/3133910","DOI":"10.1145\/3133910"},{"issue":"4","key":"3_CR42","doi-asserted-by":"publisher","first-page":"184","DOI":"10.1145\/367177.367199","volume":"3","author":"J McCarthy","year":"1960","unstructured":"McCarthy, J.: Recursive functions of symbolic expressions and their computation by machine, Part I. Commun. ACM 3(4), 184\u2013195 (1960). https:\/\/doi.org\/10.1145\/367177.367199","journal-title":"Part I. Commun. ACM"},{"key":"3_CR43","unstructured":"Melicher, D., Shi, Y., Potanin, A., Aldrich, J.: A capability-based module system for authority control. In: 31st European Conference on Object-Oriented Programming (ECOOP 2017). Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik (2017)"},{"key":"3_CR44","unstructured":"Miller, M.S.: Robust composition: Towards a unified approach to access control and concurrency control. Ph.D. Thesis, Johns Hopkins University, Baltimore, Maryland, USA (2006). AAI3245526"},{"key":"3_CR45","doi-asserted-by":"crossref","unstructured":"Osvald, L., Essertel, G., Wu, X., Alay\u00f3n, L.I.G., Rompf, T.: Gentrification gone too far? affordable 2nd-class values for fun and (co-) effect. In: Proceedings of the Conference on Object-Oriented Programming, Systems, Languages and Applications, pp. 234\u2013251. ACM, New York (2016)","DOI":"10.1145\/3022671.2984009"},{"issue":"1","key":"3_CR46","doi-asserted-by":"publisher","first-page":"69","DOI":"10.1023\/A:1023064908962","volume":"11","author":"G Plotkin","year":"2003","unstructured":"Plotkin, G., Power, J.: Algebraic operations and generic effects. Appl. Categorical Struct. 11(1), 69\u201394 (2003)","journal-title":"Appl. Categorical Struct."},{"key":"3_CR47","doi-asserted-by":"crossref","unstructured":"Plotkin, G., Pretnar, M.: Handlers of algebraic effects. In: European Symposium on Programming, pp. 80\u201394. Springer, Berlin (2009)","DOI":"10.1007\/978-3-642-00590-9_7"},{"issue":"4","key":"3_CR48","doi-asserted-by":"publisher","first-page":"1","DOI":"10.2168\/LMCS-9(4:23)2013","volume":"9","author":"GD Plotkin","year":"2013","unstructured":"Plotkin, G.D., Pretnar, M.: Handling algebraic effects. Logical Methods Comput. Sci. 9(4), 1\u201336 (2013)","journal-title":"Logical Methods Comput. Sci."},{"key":"3_CR49","unstructured":"Pretnar, M., Saleh, A.H.S., Faes, A., Schrijvers, T.: Efficient compilation of algebraic effects and handlers. Tech. rep., Department of Computer Science, KU Leuven; Leuven, Belgium (2017)"},{"key":"3_CR50","doi-asserted-by":"crossref","unstructured":"Reynolds, J.C.: Definitional interpreters for higher-order programming languages. In: Proceedings of the ACM Annual Conference, pp. 717\u2013740. ACM, New York (1972)","DOI":"10.1145\/800194.805852"},{"key":"3_CR51","unstructured":"Reynolds, J.C.: Types, abstraction and parametric polymorphism. In: Proceedings of the IFIP World Computer Congress, pp. 513\u2013523. Elsevier (North-Holland), Amsterdam (1983)"},{"key":"3_CR52","doi-asserted-by":"crossref","unstructured":"Schuster, P., Brachth\u00e4user, J.I.: Typing, representing, and abstracting control. In: Proceedings of the Workshop on Type-Driven Development, pp. 14\u201324. ACM, New York (2018). https:\/\/doi.org\/10.1145\/3240719.3241788","DOI":"10.1145\/3240719.3241788"},{"key":"3_CR53","doi-asserted-by":"crossref","unstructured":"Schuster, P., Brachth\u00e4user, J.I., Ostermann, K.: Compiling effect handlers in capability-passing style. Proc. ACM Program. Lang. 4(ICFP) (2020). https:\/\/doi.org\/10.1145\/3408975","DOI":"10.1145\/3408975"},{"key":"3_CR54","doi-asserted-by":"crossref","unstructured":"Wadler, P.: Theorems for free! In: Proceedings of the Conference on Functional Programming Languages and Computer Architecture, pp. 347\u2013359. ACM, New York (1989)","DOI":"10.1145\/99370.99404"},{"key":"3_CR55","doi-asserted-by":"crossref","unstructured":"Wu, N., Schrijvers, T.: Fusion for free\u2014efficient algebraic effect handlers. In: Proceedings of the Conference on Mathematics of Program Construction. Springer LNCS 9129 (2015)","DOI":"10.1007\/978-3-319-19797-5_15"},{"key":"3_CR56","doi-asserted-by":"crossref","unstructured":"Xie, N., Brachth\u00e4user, J.I., Hillerstr\u00f6m, D., Schuster, P., Leijen, D.: Effect handlers, evidently. Proc. ACM Program. Lang. 4(ICFP) (2020). https:\/\/doi.org\/10.1145\/3408981","DOI":"10.1145\/3408981"},{"key":"3_CR57","unstructured":"Xie, N., Leijen, D.: Generalized evidence passing for effect handlers. Tech. Rep. MSR-TR-2021-5, Microsoft (2021). https:\/\/www.microsoft.com\/en-us\/research\/publication\/generalized-evidence-passing-for-effect-handlers\/. V2, 2021-04-24"},{"key":"3_CR58","doi-asserted-by":"crossref","unstructured":"Zhang, Y., Myers, A.C.: Abstraction-safe effect handlers via tunneling. Proc. ACM Program. Lang. 3(POPL), 5:1\u20135:29 (2019)","DOI":"10.1145\/3290318"},{"key":"3_CR59","doi-asserted-by":"crossref","unstructured":"Zhang, Y., Salvaneschi, G., Beightol, Q., Liskov, B., Myers, A.C.: Accepting blame for safe tunneled exceptions. In: Proceedings of the Conference on Programming Language Design and Implementation, pp. 281\u2013295. ACM, New York (2016)","DOI":"10.1145\/2980983.2908086"},{"key":"3_CR60","doi-asserted-by":"crossref","unstructured":"Zhang, Y., Salvaneschi, G., Myers, A.C.: Handling bidirectional control flow. Proc. ACM Program. Lang. 4(OOPSLA) (2020). https:\/\/doi.org\/10.1145\/3428207","DOI":"10.1145\/3428207"}],"container-title":["Ernst Denert Award for Software Engineering 2020"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1007\/978-3-030-83128-8_3","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2022,3,29]],"date-time":"2022-03-29T18:17:37Z","timestamp":1648577857000},"score":1,"resource":{"primary":{"URL":"https:\/\/link.springer.com\/10.1007\/978-3-030-83128-8_3"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2022]]},"ISBN":["9783030831271","9783030831288"],"references-count":60,"URL":"https:\/\/doi.org\/10.1007\/978-3-030-83128-8_3","relation":{},"subject":[],"published":{"date-parts":[[2022]]},"assertion":[{"value":"28 February 2022","order":1,"name":"first_online","label":"First Online","group":{"name":"ChapterHistory","label":"Chapter History"}}]}}