Re:Why I’m not leaving Python for Go
by je42 on Sunday September 23, 2012 @07:10PM
(#4562447)
That's not the same as handling an error in a central spot automatically.
[ Parent
| on HN ]
Re:Why I’m not leaving Python for Go
by wonderzombie on Sunday September 23, 2012 @07:24PM
(#4562493)
Handling errors in one spot doesn't work for all situations, though, right? Especially in an OO environment an object may need context for retrying a request, or some other kind of error decision making. So in practice some exceptions percolate through the object graph, while others are handled in-house, so to speak.
It works for most situations. If you need retry logic - exceptions is the wrong way to go. Errors returned by the standard library are most likely not errors you want to retry by default.
Re:Why I’m not leaving Python for Go
by wonderzombie on Sunday September 23, 2012 @08:56PM
(#4562724)
That depends, though, doesn't it? Just about anything network-related is subject to flakiness, disconnection, and timeouts. That means HTTP, database connections, sockets, etc.