If you call quit() will the defers in the function still happen?

The docs for defer should mention this in: https://nim-lang.org/docs/manual.html#exception-handling-defer-statement

Also it might be worth mentioning that Nim's defer statement is block-oriented unlike Go's which is function-oriented.

2017-03-16 13:07:42
They will not happen. These mechanisms have nothing to do with each other. I agree on improving the docs. 2017-03-16 13:45:34