Hi Martin, Go doesn't have exceptions, it really doesn't. Some people like to pretend that panic/recover are exceptions, but really they are not [1].
Thanks Dave 1. https://golang.org/doc/faq#exceptions On Thursday, 7 July 2016 17:36:30 UTC+10, Martin Geisler wrote: > > Hi Dave > > On Thu, Jul 7, 2016 at 2:08 AM, Dave Cheney <da...@cheney.net > <javascript:>> wrote: > > If this function panic'd then people who raise issues to make it not > panic, > > or they would work around it with recover(), both of which would be in > less > > tested code paths. > > As a newcomer to Go, it's fun to me that you call using recover a > "work around". Throwing and catching an exception is the bread and > butter of handling errors in all other languages I know :-) > > Having to test for a variable being non-nil and manually returning it > up the call chain is very very clunky and yet it's seen as the > ideomatic and good way in Go. That's very strange to me, and from > reading about Go around the net, strange to a lot of people. > > > -- > Martin Geisler > -- 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. For more options, visit https://groups.google.com/d/optout.