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.

Why Go Is Not Good

24 pointsby ktulurulesalmost 4 years ago

11 comments

pjmlpalmost 4 years ago
Even though I have bashed Go&#x27;s lack of generics throughout its existence, this point no longer applies,<p><pre><code> package main import ( &quot;fmt&quot; ) func Id[T any] (a T) T{ return a } type Stack[T any] struct { items []T } type Num interface { type int, int16, int32 } func add3[T Num](a T, b T, c T) T { return a + b + c } type LinkedList[T any] struct { value T next *LinkedList[T] } func (oldNode *LinkedList[T]) prepend(value T) *LinkedList[T] { return &amp;LinkedList[T]{value, oldNode} } func tail[T any] (value T) *LinkedList[T] { return &amp;LinkedList[T]{value, nil} } func traverse[T any](ll *LinkedList[T]) { if ll == nil { return } fmt.Println(ll.value) traverse(ll.next) } func main() { node := tail(5).prepend(6).prepend(7) traverse(node) } </code></pre> <a href="https:&#x2F;&#x2F;go2goplay.golang.org&#x2F;p&#x2F;9cpHFGwuZmA" rel="nofollow">https:&#x2F;&#x2F;go2goplay.golang.org&#x2F;p&#x2F;9cpHFGwuZmA</a>
DJHenkalmost 4 years ago
Well, it must be good at _something_, or it wouldn&#x27;t be as popular as it is. Perhaps it&#x27;s not a perfect language and perhaps that is not important at all. I use Go on a daily basis and even after doing that for years am still very happy with it.<p>I read lists like these, try to understand what the complaint is and then... I realize that I just don&#x27;t care. There have been two or three occasions in my career that I thought &quot;Man, it would be nice if I could use some generics now&quot;, but other than that: I don&#x27;t give a fuck.<p>Go is simple enough that I can do whatever I want with it, without holding me back. It is simple enough that I can understand what my colleagues try to do without much effort. It may miss some convenient short cuts, but it is trivial to implement them yourself on the spot.<p>If it feels therapeutic to write down you annoyances, by all means go ahead. Let it out and get some peace of mind. Other than that: stop whining and just go build something useful with whatever language you prefer.
评论 #27629590 未加载
评论 #27629628 未加载
评论 #27648882 未加载
Rochusalmost 4 years ago
Well, if you prefer Rust, Haskell or C++ then why don&#x27;t you just use Rust, Haskell or C++? Languages like Go or Oberon are intentionally as simple as possible, which is their core benefit, not their weakness. That is precisely the advantage of the diversity of languages: you can choose the one that suits you best.
评论 #27629633 未加载
james305almost 4 years ago
Go seems to be a favorite language to hate, and yet, there&#x27;s a lot of awesome software in the world because of it. It&#x27;s simply and lack of features was intentional; not a design flaw. It was built by some of the premier computer scientists of our age not for lacking of knowledge of modern language features but intentionally avoiding complexity.<p>Choose Rust and C++ for building your next OS, but Go is great when I need to build a web service that&#x27;s fast enough and hire a team that may not know the language walking in the door but can be productive quickly.
评论 #27629611 未加载
aliasElialmost 4 years ago
User defined operators frequently lead to programs that are difficult to understand, e.g. what is this &#x27;+&#x27;. When reading you will probably at first assume that it is adding two numbers, but then you also have to consider all other versions of this operator function. A function call with a good descriptive name is much clearer.
评论 #27631656 未加载
评论 #27648912 未加载
fwsgonzoalmost 4 years ago
I get what you are saying, and that&#x27;s why I am personally sticking with C++, and in the future Rust, but I can understand why many like the comfort of a simple language like Go. It has attracted many C developers who don&#x27;t like the heavy abstractions that C++ and Rust offers.
Laremerealmost 4 years ago
As best as I can tell, this article is from 2014. Only date I found for it was in the rss feed.
erualmost 4 years ago
Compare <a href="https:&#x2F;&#x2F;github.com&#x2F;ksimka&#x2F;go-is-not-good" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ksimka&#x2F;go-is-not-good</a>
评论 #27629307 未加载
mseepgoodalmost 4 years ago
&gt; Generic Programming<p>The author does not seem to be aware that generics are coming in Go 1.18.<p>&gt; Language Extensibility<p>Go was carefully designed to disallow this kind of extensibility. The point is that operators and other language constructs like `for ... range` always can be trusted and have a known cost. The author basically lists a pro as a con.
omginternetsalmost 4 years ago
Ugh, this again. I can already predict the responses:<p>Person A: “go lacks feature X!”<p>Person B: “that’s what makes it so simple!”<p>And round and round it goes...
1_playeralmost 4 years ago
Second time a new account posts this 2014 article in 2 weeks.<p>Flagged, here&#x27;s some previous discussion: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;from?site=yager.io" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;from?site=yager.io</a>