On Thu, Jul 7, 2016 at 9:44 AM, Dave Cheney <d...@cheney.net> wrote:
> 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].

Yes, sure, they're called something else :-) But they behavior matches
what you get with exceptions in other langauges: stack-unwinding until
you find a handler that deals with the error. True, in Go you need to
manually check (with a type switch, maybe) that you can handle the
error after you call recover() -- that's normally part of the syntax
in other languages.

> 1. https://golang.org/doc/faq#exceptions

-- 
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.

Reply via email to