We are working on an implementation of defer statements that makes most defers no more expensive than open-coding the deferred call, hence eliminating the incentives to avoid using this language to its fullest extent. We wanted to document the design in the proposal/design repo.
See issue #14939 for discussion of defer performance issues.
The design document is posted here. The current, mostly complete implementation is here
Comments are welcome on either the design or the implementation.
We are working on an implementation of defer statements that makes most
defers no more expensive than open-coding the deferred call, hence eliminating the incentives to avoid using this language to its fullest extent. We wanted to document the design in the proposal/design repo.See issue #14939 for discussion of
deferperformance issues.The design document is posted here. The current, mostly complete implementation is here
Comments are welcome on either the design or the implementation.