4 ms·
Go's Error Handling Is Elegant
- flukus 10y agoNow compare a method with multiple lines and code paths, all with potential failures. The problem with returning error codes is that you have to handle it for every external call, with exceptions you don't. The contrived examples hide this.