I have been thinking about algebraic effects and handlers for low-level systems programming:
Inspired by the way Zig exposes memory allocation pretty pervasively, I was wondering if I'd be able to have allocators be some kind of 'effect' in Pikelet: ziglang.org/#Manual-memory 1/3
Conversation
This leads to an annoying cycle of features however. If effects need to be reified as data, then will yielding effects also require effects? ๐ณ There are ways to optimise away handlers using inlining and fusion, but this goes to a more fundamental level I think? 2/3
1
So I was wondering: Is there some dual(?) notion to algebraic effects and handlers? Where you inject handlers rather than executing on reified effects after the fact? I think this might look something like how Clean does effects with uniqueness typing: clean.cs.ru.nl/download/html_ 3/3
3
1
Oh, the other tricky thing is that this would somehow need to interact with some sort of region/borrowing system I'm guessing? ๐ณ Dunno if a type system like Granule's (granule-project.github.io) could help here ๐ค Waves hopefully at ๐
