2 ms·
This feels like it has been written by someone who recently started using the language, considering that the code in many places simply doesn't compile and has
by skarlso 3y ago
This feels like it has been written by someone who recently started using the language, considering that the code in many places simply doesn't compile and has syntax errors or logical errors in it.
Many people coming into Go as a new language immediately start bickering about how they want their previous language features in Go rather than accept what Go has to offer and at least try to understand it. This is the equivalent of moving to another country and then refusing to integrate but being very vocal about how said country sucks.
I genuinely appreciate Go's error handling because it's clean and on the nose. It's not hidden behind weird syntax/values that you have to unpack. It's right in your face all the time. When you read the code, it reads cleanly and understandably, even for a beginner. They don't have to adapt to some weird combination of failures / unpacking/choosing something different when there is an error; you immediately see that there could be an error.
And regarding stack traces, wrapping errors will provide you with failure locations to the line code. You can have all sorts of nice output for errors you can later parse and identify.
I get that some people go into Go because of a shift in the company and have no choice; I feel you. For me, it was a life changer. I learned to love coding again after 15 years of writing Java Beans, Spring annotations, CreateMyFriggingObjectFactorySingletonBuilderFactoryBuilders.
- MrBuddyCasino 3y ago> CreateMyFriggingObjectFactorySingletonBuilderFactoryBuilders 2005 called, they want their Enterprise Java™ jokes back.
- skarlso 3y agoI _WISH_ this would be 2005. Did you ever work at a bank? They are still using 1.6-1.9 maybe. I still know modern Java codebases where long descriptive class names are a must. So sadly, while I understand your sarcasm, it is not the case.