News for hackers. Stuff that matters.
Re:Building Web Apps in Go by NateDad on Monday March 28, 2016 @09:17AM (#11374045)
As others have said, it is highly discouraged by the community to use panics as control flow. Generally a panic means there's a serious bug somewhere - not just that unexpected stuff happened, but the programmer actively is doing something wrong.

Any library that panics for reasons other than a programmer bug would never be used by the community. I read a lot of Go code and look at a lot of Go libraries, and I've never seen one that said it purposely panics in my 3.5 years of writing Go.

Compared to Java, C#, Python, C++ etc... where declaring your code panics is a perfectly normal and expected way to report errors.

There are no comments on this comment yet.