dpiponi, I'd love something like algebraic effects in C++. So I could write code like (and this is just a sketch, not a realistic proposal for syntax):
handle (new -> MyOwnMemoryAllocator)
{
int* x = new int[n];
...
}or
handle(out -> Log)
{
out << "debugging stuff" << endl;
}
Add comment