Hacker News new | ask | show | jobs
by mhh__ 1482 days ago
D has constructs:

    scope(exit) foo(); // Call foo at the end of the scope
    scope(success) foo(); //Call foo if all goes well
    scope(failure) foo(); //Call foo if the wings fall off the plane.