4 ms·
>Ehm, not sure I understood, but I'd say no. Defer is just code that is executed in reverse order upon return from a fuction. I'd say more like the equivalent
by coldtea 9y ago
>Ehm, not sure I understood, but I'd say no. Defer is just code that is executed in reverse order upon return from a fuction.
I'd say more like the equivalent of a "finally" clause (or more) for your whole function.
Though not sure about the "executed in reverse order part" -- what's "in reverse order" about Defer? Except if you mean that multiple defers get executed "last seen first"...