1. 17

tl;dr Turns out defer is rather expensive.

    1. 1

      Future versions may optimize defer calls. The problem with Go is that it was adopted very swiftly at a very young age. Many other languages had the time to mature before being widely adopted. One should see this as a success story for Go.

    2. 1

      I’m now curious how defer is handled internally, it seems as though one ought to be able to get it for free with CPS by just wrapping the deferred expression around the success and exception continuations