On Thursday, 7 July 2016 01:45:17 UTC+2, Dave Cheney wrote: > > Why panic, the method returns an error value that can be used to tell the > caller they made a mistake.
There's a subtle line there and Go's philosophy is not firmly on one side of it. I think the key phrase would have to be: "this error should not occur". When it does, you panic, because you have no idea what to do, no idea how to get out of there and, quite likely, no idea how the hell you got there in the first place. Any other context, return an error code, let the invoker figure out whether SHE wants to panic. Oh, the other condition that may justify a panic would be if corruption is detected AND there is no possible recovery to a known healthy state. All of these sound to me a lot like much closer to the hardware then Go should be allowed to go. Lucio. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.