It's a post from 2013 . Anyway the idiomatic way to do scope guard is with a template that does try: body finally: as it's done by Udiknedormin [here](https://forum.nim-lang.org/t/3205/1#20223).
There is an example in the [guards and lock section](https://nim-lang.org/docs/manual.html#guards-and-locks) of the manual too.