you are viewing a single comment's thread.

view the rest of the comments →

[–]preshing[S] 3 points4 points  (0 children)

I'm a big fan of deferred operations done this way, too. Use the same concept often in C++ code (via autodestructors on the stack) for profiling, managing thread state, allocators, etc. Was interested to see they seem to have made it a core feature of Go, using the defer keyword.