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.

Golang Sucks

3 pointsby one2three4over 3 years ago

2 comments

daviddever23boxover 3 years ago
Somehow the rest of us manage to get quite useful work done in Go.<p>What’s your daily driver?
one2three4over 3 years ago
Honestly the only real argument I&#x27;ve heard for Golang is that it is &quot;coming from Google so it must be good&quot;. Every time I&#x27;ve tried to write in this language it feels like I&#x27;m hitting my head with a hammer.<p>Google might have very smart and knowledgeable people in it but this language is like a bad overhyped C. See next code that all it is doing is parsing a CSV line:<p>func NewPoint(line string) *Point {<p>tokens := strings.Split(line, &quot;,&quot;)<p>if len(tokens) != 4 {<p><pre><code> return nil } var err error p := new(Point) </code></pre> &#x2F;&#x2F; why cannot I declare and assign err in one go??<p>p.id_ride, err = strconv.Atoi(tokens[0])<p>if err != nil {<p><pre><code> return nil } p.lat, err = strconv.ParseFloat(tokens[1], 32) if err != nil { return nil } p.ts, err = strconv.ParseInt(tokens[2], 10, 64) if err != nil { return nil } return p </code></pre> }<p>most of the code has nothing to do with its functionality - it&#x27;s just error handling that is plain hideous to write and read. Not to mention all the clutter to just convert an integer and a float.<p>And let&#x27;s just not go into deeper aspects such as the structs that double as classes and has everyone creating his own style of SOLID and DPs. Or the inconsistent syntax which sometimes looks like traditional OO and othertimes like plain C further confusing users.<p>I find it very hard to believe that this language would have caught on if it weren&#x27;t for Google pushing for it so aggressively. And I find it so disheartening to realise that after all these years developer productivity and happiness is merely an afterthought for language designers and that marketing and hype are the main drivers.<p>And yes I know the saying &quot;there are languages people complain about and languages that people do not use&quot;. I find it worthy of high school gotcha sayings to which I reply that language designers of the majority of programming languages have no clue about how to make a language nice to its users. It&#x27;s as they know how to design a internal combustion engine and then they put a chair and 4 wheels on it and they dismiss complaints about how unreasonably difficult and miserable the driver experience is.
评论 #29124115 未加载