Panic recover in Go v.s. try catch in other languages

Viewed 9350

I've just read this post about Panic/Recover in Go and I'm not clear on how this differs from try/catch in other mainstream languages.

6 Answers

"go" is unlike other languages a concurrent language, meaning that parts of the program runs in parallel. This means that if the designers want to have a similar mechanism as catch/throw , the mechanism has to meticulously redefined in this context. That explains the differences between the two mechanisms.

Related