The problem of effect polymorphism is a major obstacle to wide adoption of effect systems in the programming community. The absence of effect systems reduces compiler optimization opportunities and disables effect constraints on APIs in parallel and distributed computations. This study shows that capability-based effect systems, equipped with stoic functions and free functions, can easily solve the problem of effect polymorphism without incurring notational burden on programmers. With this advantage, capability-based effect systems stand a better chance to be adopted by the programming community. The central idea of capability-based effect system is that a capability is required in order to produce side effects. If capabilities are passed as function parameters, by tracking capabilities in the type system we can track effects in the program. To ensure that capabilities are passed through function parameters, instead of being captured from the environment, we need to impose a variable-capturing discipline, stipulating that capa- bility variables cannot be captured. Functions observing the discipline are called stoic functions, while functions not observing the discipline are called free functions.
Aleksander Slawomir Boruch-Gruszecki
Matthias Finger, Qian Wang, Yiming Li, Varun Sharma, Konstantin Androsov, Jan Steggemann, Xin Chen, Rakesh Chawla, Matteo Galli, Jian Wang, João Miguel das Neves Duarte, Tagir Aushev, Matthias Wolf, Yi Zhang, Tian Cheng, Yixing Chen, Werner Lustermann, Andromachi Tsirou, Alexis Kalogeropoulos, Andrea Rizzi, Ioannis Papadopoulos, Paolo Ronchese, Hua Zhang, Leonardo Cristella, Siyuan Wang, Tao Huang, David Vannerom, Michele Bianco, Sebastiana Gianì, Sun Hee Kim, Davide Di Croce, Kun Shi, Abhisek Datta, Jian Zhao, Federica Legger, Gabriele Grosso, Anna Mascellani, Ji Hyun Kim, Donghyun Kim, Zheng Wang, Sanjeev Kumar, Wei Li, Yong Yang, Ajay Kumar, Ashish Sharma, Georgios Anagnostou, Joao Varela, Csaba Hajdu, Muhammad Ahmad, Ekaterina Kuznetsova, Ioannis Evangelou, Milos Dordevic, Meng Xiao, Sourav Sen, Xiao Wang, Kai Yi, Jing Li, Rajat Gupta, Hui Wang, Seungkyu Ha, Pratyush Das, Anton Petrov, Xin Sun, Valérie Scheurer, Muhammad Ansar Iqbal, Lukas Layer