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

"there are very compelling reasons for not having exceptions, given goroutines and channels"

This confuses me I would have thought the opposite would be true. The goroutine/channel concept seems Erlang like to me. Erlang uses exceptions, if a process crashes an exception is thrown to its parent which can then act appropriately. How does Go handle this, i.e. if a goroutine crashes who gets informed and how?



goroutines are Erlang-like. Erlang doesn't have 'exceptions' though. In Erlang, if a process crashes (simulated or unexpectedly) it implicitly sends a specific message to it's parent. In Go you can emulate this by just checking for return values of stuff you do in the goroutine and send a similar message if it fails.

The fact that Go is in early development here and I'd say this both could and will be improved in the future.


I'm not sure there's always going to be a "parent."




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: