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 <[email protected] <mailto:[email protected]>> 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
[email protected]
http://mail.pm.org/mailman/listinfo/kc

_______________________________________________
kc mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/kc

Reply via email to