dpiponi,
@dpiponi@mathstodon.xyz avatar

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;
}

dpiponi,
@dpiponi@mathstodon.xyz avatar

In the old days we used to routinely install (and chain) our own handlers for effects :)

BartoszMilewski,
@BartoszMilewski@mathstodon.xyz avatar

@dpiponi It reminds me of DOS interrupt 21h. The latest iteration on this theme is the hypervisors used to implement virtual machines and the Blue Pill rootkit. https://en.wikipedia.org/wiki/Blue_Pill_(software)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • GTA5RPClips
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • Durango
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • ngwrru68w68
  • kavyap
  • tacticalgear
  • ethstaker
  • JUstTest
  • InstantRegret
  • Leos
  • normalnudes
  • everett
  • khanakhh
  • osvaldo12
  • cisconetworking
  • modclub
  • anitta
  • tester
  • megavids
  • provamag3
  • lostlight
  • All magazines