Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Let it fail, let it fail, let it fail! (to the tune of "let it snow, let it snow, let it snow!) Supervisor Trees!

Exceptions are not much better, but checking the return every time is no fun. And if you crash the whole thing crashes.

In erlang you can have a once in 1x10^9 error and not even catch it, but only that process crashes (and your system keeps running) and that process gets relaunched. With go, it's the whole program that will crash, necessitating checking every return value.

I say this, though I might be missing some error handling system in go that I'm simply not aware of.



You can set a `defer recover()` which will stop the panic from crashing the entire program, letting you recover & take whatever action you deem appropriate.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: