News for hackers. Stuff that matters.
Re:Things from Python I'd miss in Go by dragonwriter on Tuesday June 10, 2014 @10:24AM (#7872652)
> There's a panic/recover in Go, but they aren't serious.

They are very serious.

> At least, to my limited knowledge of Go, there are no guidelines on using them properly, so everyone panics with whatever they fancy, and this lack of conventions is a bit problematic, like `raise "Failed to open file"` in Python.

The convention is that you don't let panics escape across the public API of your function -- which also makes most other cross-project conventions for panics unnecessary. Its probably useful to have internal conventions within a project for internal consistency, but since none of your panics should ever escape across a public API boundary, a broader convention would have limited benefit.

There are no comments on this comment yet.