4 ms·
Not a huge fan of the try built-in spec as proposed but I struggle to understand the reasoning behind people arguing that the current error checking/handling pa
by remon 7y ago
Not a huge fan of the try built-in spec as proposed but I struggle to understand the reasoning behind people arguing that the current error checking/handling paradigm "at least makes the code readable/understandable". It doesn't. The whole issue with golang error checking boilerplate is that your brain will start seeing it as noise, which may obfuscate issues within the code. This is especially true for code you have not worked on yourself.
- JulianMorrison 7y agoYeah, and this new change doesn't alter how explicit the code is. The new "try" just means "return error from here without setting the LHS if the RHS returns an error". It is the standard boilerplate captured. When this is in common use, it will greatly improve the visibility of non boilerplate error handling.