3 ms·
In Nim, defer is a macro, that rewrites scope into "try: finally:" statement. 'finally' code block is always executed, even if there were any exceptions. https
by archargelod 3y ago
In Nim, defer is a macro, that rewrites scope into "try: finally:" statement. 'finally' code block is always executed, even if there were any exceptions.
https://nim-lang.org/docs/manual.html#exception-handling-defer-statement https://nim-lang.org/docs/manual.html#exception-handling-def...
- Jtsummers 3y agoYeah, my main question was about the scope of the defer but it appears that it's block scoped like Swift, not function scoped like Go.