Vale's Higher RAII, the pattern that saved me a vital 5 hours in the 7DRL Challenge

from blog Languages and Architecture, | ↗ original
How a language can enforce that we call an arbitrary function before destroying an object.