3 ms·
Go 2 is likely to get a per-call variation of try/catch via named handle blocks, see: https://github.com/golang/go/wiki/Go2ErrorHandlingFeedback https://github
by networkimprov 8y ago
Go 2 is likely to get a per-call variation of try/catch via named handle blocks, see:
https://github.com/golang/go/wiki/Go2ErrorHandlingFeedback https://github.com/golang/go/wiki/Go2ErrorHandlingFeedback
and this broad survey of error handling requirements:
https://gist.github.com/networkimprov/961c9caa2631ad3b95413f7d44a2c98a https://gist.github.com/networkimprov/961c9caa2631ad3b95413f...
Also the author overlooks the Error Values draft design, which is tentatively targeted for Go 1.13:
https://go.googlesource.com/proposal/+/master/design/go2draft-error-values-overview.md https://go.googlesource.com/proposal/+/master/design/go2draf...
- TheCoelacanth 8y agoI believe handle blocks is exactly what they were referring to as "basically a reverse try-catch at best and a Visual Basic “on error goto” at worst".
- networkimprov 8y agoBased on the feedback page linked above, I believe what is likely for Go 2 is quite different than "check/handle". See the requirements page linked above for more.