Comment Re:Java flashbacks... (Score 4, Insightful) 124
The "try" operator in Java never worked well. No reason to make the same mistake in Go.
On the contrary, the try statement and exceptions have worked well in many languages for decades.
Error codes could be, and frequently were, ignored. Exceptions cannot be.
Error codes led to long chains of error handling intermixed with the code for the normal flow of control, decreasing readability. The code for handling exceptional cases can be segregated.
Error codes require effort in each method to communicate failure up the stack. Exceptions don't.
Error codes cannot be easily communicated by functions in languages without pass-by-reference. Exceptions can be.