[Kc] exception handling in golang

Teal ironicface at earthlink.net
Fri Apr 26 14:45:49 PDT 2013


Interesting.
Didn't know you had written a module like that.

Teal

> Yes indeed. their "defer" mechanism gets to be catch blocks as an 
> extra thing. I wonder if the Go compiler treats recover() specially to 
> optimize happy paths. It certainly could.
>
> Go is the first compiled language I've seen with "Yoda's exceptions" 
> as discussed thirteen years ago on
> the perl six development lists. They recommend against using them, and 
> didn't even bother to suggest repanicking with the received exception 
> after recovering an unexpected panic topic. Which is obvious to
> anyone who likes exception-based control flow, so no hard feelings. I 
> like the way that the "defer" keyword, which is like on_exit from CPAN 
> (my version works better! prefer local$on_exit, it will continue to 
> work right even if garbage collection starts getting deferred) doubles 
> as "catch."
>
> On Fri, Apr 26, 2013 at 3:52 PM, Teal <ironicface at earthlink.net 
> <mailto:ironicface at earthlink.net>> wrote:
>
>     I think the go approach is pretty interesting.
>     Seems to create some other possibilities besides just error handling.
>
>     Teal
>
>
> -- 
> *indigestion from sufficiently magical technology is no advance*
>
>
> _______________________________________________
> kc mailing list
> kc at pm.org
> http://mail.pm.org/mailman/listinfo/kc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/kc/attachments/20130426/5b2c08e1/attachment.html>


More information about the kc mailing list