> 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.
No. Go already has all the runtime functionality necessary to support exceptions via panic/recover.
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.