On Tue, 9 Jul 2019, at 11:43 AM, Nicolas Grilly wrote: > >> So why complicate the language with a new keyword which has really no >> purpose. > > As mentioned in the proposal, try is not a new keyword, it's just a new > built-in function.
It's quite a bit more than a just new function since it brings some new behaviours that we don't have for functions in Go at the moment: 1. like panic it interrupts its caller's control flow 2. It may only be used within functions/methods that have a particular signature. Presumably it's a compile error to attempt to use it elsewhere. 3. It accepts any number of mixed type arguments without boxing into an interface{} Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/02225c85-a48d-4fde-b067-b94d863f4d24%40www.fastmail.com. For more options, visit https://groups.google.com/d/optout.