3 ms·
I would code in Go.
by nocubicles 6y ago
I would code in Go.
- closeparen 6y agoI write Go at work I thought I would use it for a recent side project to avoid stumbling around another language, but I just couldn’t do it. Testing err != nil branches is excruciating. I have no will to do it except for money, and low test coverage makes me feel too dirty to be happy with my work if I skip it.
- johnthescott 6y agoi find proper error handling to be just as interesting as coding the actual algorithm, especially server-side. debugging big distributed systems often boils down to how errors are handled. throwing an exception loses too much context and feels like cheating.
- closeparen 6y agoIt’s interesting when there’s some way to recover from the error, but the vast majority of the time I’m just wrapping it and passing it up to the caller. It also depends somewhat on how many potentially-error-returning calls are involved in an operation. Go’s verbosity means there can be 7+ different error return points in what would be a single statement in another language (HTTP request, subprocess, etc). I sometimes like the fact that I have to handle error for the operation generally, but not at that level of detail.