Elevate your wrappers: a new level of dispatch with closures.

By Steven Lembark

Elevator Pitch

This year looks at the inverse: Writing wrappers that adjust their calling space, manage arguments, or perform cleanups. Combining the flexibility of closures with Perl’s “goto” makes them invisible.

Description

This starts with the guts of Damian Conway’s MultiMethods dispatch engine, and looks at ways that the wrapper can exist but erase itself from the stack so that die, croak, and friends report errors properly. The technique of combining closures as wrappers with goto permits all sorts of clean, effective magick.

Notes

I’m still figuring out how to do this in Raku… more to follow…