TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The reasons why Golang is a bad language, according to my friend

6 pointsby avesturaover 1 year ago

1 comment

PaulHouleover 1 year ago
It has been fashionable since 1992 to complain about OO programming and around that time hate for exceptions started to grow. Half of it was that exceptions had a broken implementation in C++, half of it was a reflexive rejection of anything having to do with Java. (Is it a lost opportunity that they didn’t fill Java up with really bad ideas to get them rejected by the community.)<p>In the 1980s I remember looking at good C code and thinking, gee, correct error handling bloats code by 2x or 3x and it is not the ceremony and superfluous agreement of Java which the compiler helps you maintain but instead it is devilishly complex and any mistake in it is likely to go untested. (e.g. and if you did actually write automated tests again you’d probably have to 2x or 3x the code again to get in mocks.)<p>I had an engineering manager who thought error handling in Scala was great with monads and also boasted that his team did rigorous code reviews but when I got my hands in the code I found it was like bad C code from the 1980s, the facilities to do error handling were there but people weren’t using them. Errors just got ignored, so our data analytics system would just give wrong answers.<p>Exceptions, in the other hand, do something sane automatically and don’t make your code unmaintainable by building an elaborate error handling machine that is closely interspersed with your code. It is such a terrible step backwards to give up on exceptions.
评论 #39030117 未加载
评论 #39029318 未加载