News for hackers. Stuff that matters.
Re:More Gotchas of Defer in Go, Part II by pcwalton on Thursday December 21, 2017 @08:09PM (#15984476)
It's more explicit, which is a good thing, as it makes the intent clear. This matters if, for example, the function is later refactored to inline into a caller.
Re:More Gotchas of Defer in Go, Part II by Groxx on Thursday December 21, 2017 @08:37PM (#15984615)
It also allows more flexibility (do you execute them in the order they were enqueued, or in reverse?), more room for errors, confusion between different patterns / lack of consistency across different codebases, etc.

Explicit-all-the-things isn't an unambiguous Good Thing™. If it were, we wouldn't even be discussing this - it's an abstraction, which is less explicit than e.g. building defer out of a list and using GOTO.