add the DeferStatement
Similar to D scope(exit)
or Zig defer
. When there are many ReturnStatments that really sucks to insert manually something that has to be done on return manually.
syntax:
on return do {}
on return do exp;
problem is that this only works for returns, D scope(exit)
is really for when a BlockStatement is left, which is smarter.
Edited by Basile.B