News for hackers. Stuff that matters.
Re:Errors are values by marktangotango on Tuesday January 13, 2015 @08:49AM (#8879767)
>> We've since found exceptions, Maybes, and friends which are very powerful.

I think, and someone correct me if this is wrong, that implementing exceptions in Go is prohibited by go routines.

The stereotypical way to implement exceptions is using setjmp/longjmp which unwind the stack back to a known location. Since go routines are implemented as continuations, any particular executing go routine may or may not have it's stack in context, and I'm not sure what it means to unwind stacks across multiple continuations, ie is it even possible?

So that's one possible example.

Re:Errors are values by pcwalton on Tuesday January 13, 2015 @09:49AM (#8880144)
> I think, and someone correct me if this is wrong, that implementing exceptions in Go is prohibited by go routines.

No. Go already has all the runtime functionality necessary to support exceptions via panic/recover.