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.

What's the role of Go in a universe where Rust exists?

68 pointsby Fiveplusover 4 years ago

16 comments

kevincoxover 4 years ago
I still don&#x27;t think Go is a good language. I had notable experience at Google and the following things constantly bugged me:<p>- It was very difficult to read. When trying to review the code every detail was left out. While each line was simple it was hard to actually get the high-level picture of what code was doing.<p>- Very error prone. Maybe it isn&#x27;t C dangerous but &quot;defaults are useful&quot; is the breeding ground of bugs. The number of outages we had due to trivial Go bugs was embarrassing and time consuming.<p>- Some simple things are just too hard. Most of these boil down to lack of generics. For example inserting an element into an array needs multiple lines of code.<p>- Many common functions and buitins have very questionable decisions that are huge footguns. Especially the fmt library. (It tries its absolute hardest not to fail. Instead it just outputs garbage and &quot;succeeds&quot;)<p>I get that it is easy to write, and that each line of code is simple. However I think they went way too far.<p>I see Go as a slightly higher level C. You get better package management, memory management and interfaces. However C is still way too basic for my preferences.<p>It is a weird spot though. It is sitting in about 2x C performance. It is unclear what to recommend in that spot as many languages are significantly slower. Rust is probably roughly as productive, but much harder to learn. Most of the interpreted languages are significantly slower.<p>There are some JVM languages that are better and have similar performance. However there is a memory and startup overhead. However I think they make more sense in the end. JavaScript is also a pretty good choice. It is in roughly the same performance realm but much more productive I think. (Especially TypeScript).
评论 #26095239 未加载
评论 #26097089 未加载
评论 #26096265 未加载
评论 #26095648 未加载
评论 #26093331 未加载
todd8over 4 years ago
I&#x27;m not looking for a job, but I&#x27;m often invited to chat with a company&#x27;s dev team, and I get a chance to see what they are doing and how they are doing it. The last company I visited was a handful of Physics Ph.D.s. They were writing control software.<p>Obviously, this team was <i>really</i> smart, but they were not high power software developers. They weren&#x27;t ex-kernel developers and they didn&#x27;t write 3D game engines in their spare time. They were just really smart guys that knew how to program.<p>They were using go, and I felt like that was a great choice for them. Fast enough performance, comfortable development, and easy enough to understand. This is what I really like about go.<p>Languages like Haskell and Common Lisp are popular topics here on HN, but they&#x27;d be poor choices for a startup made up of domain experts that aren&#x27;t CS-majors. I&#x27;m sure these guys could have learned Rust or even modern C++, but with go they could get started in a language that wouldn&#x27;t take a year of experience to use correctly.<p>For my many little personal projects, I like python, but for team projects were there will be a mix of abilities go seems like a good choice.
评论 #26097525 未加载
评论 #26100562 未加载
dnauticsover 4 years ago
Great article. I would say my two minor disagreements is that go&#x27;s fast compilation is not... Typically used for tests, in my opinion the testing discipline in go is low. I would go so far to say that go is neither &quot;a better c++&quot; nor &quot;a better c&quot; but rather &quot;a better python&quot;.
评论 #26093243 未加载
maxekmanover 4 years ago
Go is good because it’s easy to read and pickup, and it compiles really fast. I would say it’s good for request based services but I don’t think it’s as good as it can be for enterprise code. What I miss most is the lack of sum types to limit state space, which is very useful in business logic.
hn_askerover 4 years ago
Go is much easier to learn and get up and running compared to Rust in my experience. It&#x27;s great for writing servers and multi-threaded applications. Rust can be used to optimize but you&#x27;ll probably get a lot of mileage out of golang before having to switch.
MikeDeltaover 4 years ago
The other day I read an article about which language C programmers should use, and how Go is better thought of than Rust but that in the end his suggestion is to go for C++ [0].<p>Interesting observation was that the Rust community had more fanatic followers who believe in Rust and nothing else, whereas the Go community was more relaxed about it.<p>That makes me wonder: if something had been written in Rust, would a Go, Python, or C++ developer ask why not in their language? Or would they just not care?<p>[0] <a href="https:&#x2F;&#x2F;berthub.eu&#x2F;articles&#x2F;posts&#x2F;cpp-rust-go&#x2F;" rel="nofollow">https:&#x2F;&#x2F;berthub.eu&#x2F;articles&#x2F;posts&#x2F;cpp-rust-go&#x2F;</a>
评论 #26100572 未加载
lgunschover 4 years ago
&quot;Go is simple&quot; is the main one and only reason I love Go.<p>I learned Rust in my spare time, and it took me months to get to the point where I could write anything useful at all. I never did feel like I knew the language. I just don&#x27;t have the spare time and energy to put in such a monumental effort into learning a language. After 2 weeks of Go I knew nearly all the ins and outs of the language. Once you add in sophisticated and strict linting from golangci-lint you just can&#x27;t go wrong. Code reviews are a breeze and understanding code is a breeze.
评论 #26096762 未加载
waychover 4 years ago
&quot;The Go compiler is fast.&quot;<p>This was Google&#x27;s motivation for Go and the reason it was designed the way it was.
评论 #26096761 未加载
评论 #26098490 未加载
igmorover 4 years ago
That&#x27;s a wrong question to ask. Rust is the one trying to squeeze in to the already crowded place, not Go.
dzongaover 4 years ago
Golang though excellent lost the plot by having Nil pointers. it means bugs will always exists inside code intentionally or not.
pornelover 4 years ago
To me Go is competing with JavaScript, not Rust. If you&#x27;re considering writing a CRUD app in Node.js, you can do it in Go, and it&#x27;ll be equally easy, and maybe run faster.<p>But if you&#x27;re writing a driver, codec, kernel, firmware, or even a library that&#x27;s supposed to be usable with more than one language, Go is just not a good fit.
评论 #26095920 未加载
评论 #26096089 未加载
vinliaoover 4 years ago
&gt; Let’s avoid tying our identity to a single language and embrace practicality first and foremost.<p>This is very poignant.<p>I feel like there a part of us that is attached to a certain language&#x2F;framework, and we intentionally wear a blindfold to avoid seeing other solutions that are more practical.
elipseyover 4 years ago
That fact that we need to prepare in advance to defend learning a new-ish language and then using to build something interesting or useful is a depressing.<p>Oh well, the PM will make you re-write it in that k8s thingy anyway, because everyone else has it.
naikrovekover 4 years ago
Well, if you have an unexplained hatred for typing double colons five times per line of code, as I do, Go allows you to not do that.<p>Rust::Forces::Them&lt;Colons&gt;::Everywhere::AllTheTime();
评论 #26098086 未加载
knodiover 4 years ago
DevOp, Python replacement.
DLAover 4 years ago
All the things &#x27;hn_asker&#x27; said plus a giant ecosystem, huge developer attention, amazing tooling, outstanding support for parallelism, jobs, a good pool of enterprise-grade projects (CockroachDB, all the thinks from HashiCorp, K8S, Docker, etc).<p>And Gophers!
评论 #26093171 未加载