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.

Rust vs. Go

37 pointsby bitfieldover 4 years ago

15 comments

klodolphover 4 years ago
I use Rust and Go.<p>I think missing from this is a discussion about which projects might be more enjoyable to write in Go or Rust.<p>Nearly all the automation and web services I do is in Go. In Go it&#x27;s easy to pull in libraries to work with other services. Everything from pushing Route 53 changes to making automated changes to HTML documents in a web server. Build pipelines that require orchestrating other processes. Development servers.<p>I sometimes reach for Rust when there&#x27;s some more intense central algorithm or data structure I want to work with. This could be something like image manipulation or writing a compiler or parser. Writing a parser in Rust is a joy.<p>I&#x27;m going to make an unfair generalization: Go is more likely to get the job done, Rust is more likely to do the job well. Just my feelings on the matter.<p>As an illustration... if you are spawning a process, you don&#x27;t really care about how efficient you are constructing the strings for the argument list. If you are writing a compiler, you <i>do</i> care about how efficient your string manipulation is.
评论 #25007536 未加载
评论 #25014459 未加载
jphowardover 4 years ago
I am all for writers taking a balanced perspective, especially when it comes to something as subjective and controversial as programming languages.<p>However, I do find it a bit frustrating when someone writes a 10 page article and concludes with &quot;you can use either&quot;. It&#x27;s actually not helpful to the reader, because they do have differences, which you&#x27;ve talked about extensively in the preceding 10 pages. If they were identical, you wouldn&#x27;t need the article, and OBVIOUSLY you can use either.<p>Indeed, in the post above he made valid points such as Go may be thought to prioritise speed of development over speed to execution when compared to Rust.<p>It&#x27;s absolutely fine to state an opinion at the end of an article which is clearly on a subjective passage.
评论 #25013129 未加载
评论 #25009189 未加载
cletusover 4 years ago
I like both languages. In my mind they fill different niches:<p>- Rust is a better C++<p>- Go is a better Python<p>YMMV.<p>Some will argue we don&#x27;t need a better Python or Go isn&#x27;t a better Python. These are both entirely reasonable positions. My take is:<p>1. Go is statically typed (even with an interface{} catch-all and no generics; which honestly I personally don&#x27;t really care about but I understand if you do; it&#x27;s certainly no worse than the Python equivalent).<p>2. Python still has the issue of requiring it to be installed as well as the compatibility of that installed environment (ie what virtualenv does). Java has this issue too. Standalone executables are just more convenient;<p>3. Loading your runtime environment has a greater cost in Python;<p>4. I actually don&#x27;t like where Python 3 has gone where almost every point release at this point seems to add to the language itself. Python 3 really was a change in philosophy vs Python 2.
评论 #25016083 未加载
tasubotadasover 4 years ago
This comparison doesn&#x27;t really make that much sense.<p>Rust is a systems programming language and should be compared vs C++, C, D.<p>Go should be compared against Java, C#, Scala and the likes as all of them had similar design goals - productivity for complex systems.<p>&quot;Compiles to binary&quot; is rather a poor way to group languages.
评论 #25009211 未加载
st1x7over 4 years ago
&gt; In this article, I&#x27;ll try to give a brief overview of where I think Go is the ideal choice, and where I think Rust is a better alternative. Ideally, though, you should have a working familiarity with both languages.<p>Isn&#x27;t this pretty difficult with Rust, considering the complexity, different paradigms and the fact that the language is still evolving? I could be wrong but Rust doesn&#x27;t seem like a part-time every-once-in-a-while kind of language.
评论 #25007406 未加载
评论 #25007529 未加载
bamaziziover 4 years ago
I&#x27;ve been using Go since 2013 and have 200K+ lines under my belt. Probably the same amount of work with JS&#x2F;TS.<p>My business is APP development (marketplace, fintech, social networks and saas) ... in the past 3-4 years NEVER ONCE have I regretted choosing Go and in fact the opposite. My team is super comfortable with it, and new members joining can pick up the stack in a day. It&#x27;s cheap &amp; efficient on the servers and require minimal overhead.<p>Rust has its perk and usefulness, but for very particular, niche, software applications. It&#x27;s not a productivity gain in backend app development in my line of business. In my opinion, Rust for app development is &quot;extreme premature optimization&quot;!<p>Deep down, I really hope Go&#x27;s generics do NOT happen so the language stays simple and readable. The new propositions are worrying my team and we&#x27;ll probably ban it in our dev process.
st1x7over 4 years ago
Having done a bit of C++ back in high school, I just spent the past several weeks getting somewhat familiar with modern C++. No idea if it&#x27;s worth it or if I&#x27;m wasting my time and should have picked Go&#x2F;Rust instead.
评论 #25007465 未加载
评论 #25007681 未加载
ibraheemdevover 4 years ago
I don&#x27;t think Go is really a Systems Programming Language per say. In fact, that claim was removed from the homepage a couple of years ago.<p>&gt; When we first announced Go we called it a systems programming language, and I slightly regret that because people assumed it was an operating systems writing language, what we should have called it was a server writing language ... and it started becoming more generally useful than that - Rob Pike<p>Rust however by general consensus <i>is</i> a true systems programming language
qwerty456127over 4 years ago
&gt; Fast, compact executables<p>Fast - perhaps. Compact - hardly.
hankchinaskiover 4 years ago
are we still comparing programming languages like this in 2020? that&#x27;s why I am starting to grow sick of this industry - so much folklore, so little engineering<p>meta: i am so tired to see articles jammed with buzzwords and keywords whole purpose is to just rank high in google yet providing little to no substance. come on HN!
评论 #25007409 未加载
AnonCover 4 years ago
Is it me (with Firefox Focus) or are the styles on this page set to have the section titles in smaller fonts than the actual section text&#x2F;paragraphs?<p>@bitfield author &amp; submitter: please take a look at this. I found it difficult to scan and get the broad picture of the comparison.
评论 #25009244 未加载
aphexairlinesover 4 years ago
here we go again
unnouinceputover 4 years ago
Quote: &quot;It&#x27;s become clear over many decades of using older languages such as C and C++ that one of the biggest causes of bugs and security vulnerabilities is accessing memory unsafely or incorrectly&quot;<p>Wanna bet you can write applications that have security vulnerabilities in Rust and Go just the same?<p>Also searching on Upwork for jobs on Rust - results 47 jobs. Searching for in Go - results 213. Searching for jobs in C&#x2F;C++ - results 1139. Searching for jobs in Java - results 4262.
评论 #25008227 未加载
评论 #25007457 未加载
评论 #25009226 未加载
k__over 4 years ago
It probably started like that. Both tried to be a better system programming language, but they diverged quite much.
chimenover 4 years ago
frontpage material right there