• Robert Griesemer's avatar
    spec: clarify returns, defer statements, and panics · 1e8e14c9
    Robert Griesemer authored
    This is an attempt at making the interaction between
    these three constructs clearer. Specifically:
    
    - return statements terminate a function, execute deferred
      functions, return to the caller, and then execution
      continues after the call
    
    - panic calls terminate a function, execute deferred
      functions, return to the caller, and then re-panic
    
    - deferred functions are executed before a function _returns_
      to its caller
    
    The hope is that with this change it becomes clear when a
    deferred function is executed (when a function returns),
    and when it is not (when a program exits).
    
    R=r, rsc, iant, ken, iant
    CC=golang-dev
    https://golang.org/cl/6736071
    1e8e14c9
Name
Last commit
Last update
..
articles Loading commit data...
codewalk Loading commit data...
devel Loading commit data...
gopher Loading commit data...
play Loading commit data...
progs Loading commit data...
Makefile Loading commit data...
cmd.html Loading commit data...
code.html Loading commit data...
contrib.html Loading commit data...
contribute.html Loading commit data...
debugging_with_gdb.html Loading commit data...
docs.html Loading commit data...
effective_go.html Loading commit data...
gccgo_contribute.html Loading commit data...
gccgo_install.html Loading commit data...
go-logo-black.png Loading commit data...
go-logo-blue.png Loading commit data...
go-logo-white.png Loading commit data...
go1.1.html Loading commit data...
go1.html Loading commit data...
go1compat.html Loading commit data...
go_faq.html Loading commit data...
go_mem.html Loading commit data...
go_spec.html Loading commit data...
godocs.js Loading commit data...
help.html Loading commit data...
ie.css Loading commit data...
install-source.html Loading commit data...
install.html Loading commit data...
jquery.js Loading commit data...
logo-153x55.png Loading commit data...
reference.html Loading commit data...
root.html Loading commit data...
share.png Loading commit data...
sieve.gif Loading commit data...
style.css Loading commit data...
tos.html Loading commit data...