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?

16 pointsby leraxabout 6 years ago

5 comments

outworlderabout 6 years ago
&gt; Compare for example the explicit Go concurrency model, that enables you to design a concurrent system, with Java synchronized methods, that for me represents “I have no idea of what is wrong with this messy multi-threaded stuff, so let the must lock all this stuff up”. That is not truly simple and it assumes you are stupid and have no idea of what you are doing.<p>This may sound inflammatory, but it actually matches my experience in multiple companies.<p>With one caveat. There are programmers that will learn just enough to be dangerous, who have ingrained the thought that &quot;threads == speed&quot;, and will try to sprinkle multi threaded code everywhere. Said code will misbehave, which will cause them to spray &quot;synchronized&quot; keywords all over the codebase – until it stops misbehaving. Or, at least, until bugs cannot be reliably reproduced anymore. Now you have bottlenecks everywhere, even if it did make sense to spread the workload across cores, or when you&#x27;d be waiting for I&#x2F;O otherwise.<p>So many people do not actually know what they are doing. And the prevalent concurrency model in Java doesn&#x27;t help make sense of what is going on. Over time, cargo culting develops and there will be one single accepted solution codified in company policy. Usually, a sub-optimal one.<p>Go actually gives you better abstractions, so you can rely less on shared memory and more on message passing. Not only that, it makes it simpler to use this approach, vs. a Mutex and shared memory. Which means people will reach out for that first.<p>Go is not alone in this. There are languages that provide even better abstractions(Erlang for one). But Go features tend to be &#x27;good enough&#x27;.
评论 #19338752 未加载
dom96about 6 years ago
Needs a &quot;2016&quot; in the title.<p>I&#x27;ve mostly skimmed this article but based on what I&#x27;m seeing it&#x27;s more of the same, &quot;Concurrency&quot;, &quot;Simplicity&quot;, &quot;Simple deployment&quot; etc.<p>I would really like to learn something else about Go now, when is Python a better choice? When is Rust a better choice? What are the negatives of using Go?
评论 #19324066 未加载
评论 #19324781 未加载
评论 #19326845 未加载
aptaabout 6 years ago
Nothing new here. Same reiteration you&#x27;d expect from someone coming from Javascript&#x2F;Python&#x2F;etc.<p>Nothing that Java, C#, etc. wouldn&#x27;t give you (other than hype based development perhaps).
RickJWagnerabout 6 years ago
Also, Go makes for <i>tiny</i> containers. Very important these days.
评论 #19326992 未加载
评论 #19325288 未加载
SkidanovAlexabout 6 years ago
If anyone used both rust and go, are there any big advantages of go over rust (besides simplicity)?
评论 #19324770 未加载