Go and Rust are two of the hottest compiled programming languages, but which is more popular, Go or Rust?. I develop in Go full-time and love it, and I’m learning more about Rust recently - it’s an exciting language. Let’s explore some differences between the two and look at which is growing faster in the popularity polls.
Popularity Stats ๐
According to the StackOverflow 2019 surveys, Go is ahead in the polls when it comes to programming and markup languages.
However, compare that to the previous year:
Rust wasn’t even on the chart just one year before.
Go did grow by an impressive 1.6%, but it would seem Rust might be growing even faster as a percentage over time.
Some more supporting evidence for the hypothesis that Rust is growing faster is another poll - the most loved languages survey:
Rust is a clear leader here, but Go isn’t far behind. There is a lot of hype around Rust right now, for good reason.
Let’s take a look at the most dreaded languages:
No one dreads Rust. I suspect that a contributing factor is that Rust isn’t used much yet. That said, the data indicates that Rust is currently more loved and less dreaded. Hard to argue with that.
Go actually makes the most dreaded chart, but close to the bottom. I suspect most of the hate is salty Java devs that have been forced to move to Go and give up their precious objects. They had to give up generics as well up until now, but we’ll have generics in Go in 1.18.
So Which Is Better? ๐
I don’t think one is strictly better than the other, and a lot comes down to preference. Let’s examine the claims made by the maintainers:
Go is an open-source programming language that makes it easy to build simple, reliable, and efficient software.
A language empowering everyone to build reliable and efficient software.
Based on their official headlines it would seem they are in direct competition. The key difference is that Go also aims to be simple. Rust makes no such claim.
Here are my current fast and loose opinions on the strengths and weaknesses of each:
Go | Rust | |
Speed | โ โ | โ โ โ |
Memory Safe | โ โ โ | โ โ โ |
Simple | โ โ โ | โ |
Standard Library | โ โ โ | โ โ |
Memory Optimized | โ โ | โ โ โ |
Support/Community | โ โ | โ |
Concurrency (Simplicity) | โ โ โ | โ |
Lane’s Sloppy Rust vs Go Comparison
I think Go will likely be the go-to for performant backend systems. Go’s rich standard library and easy concurrency makes standing up HTTP servers or other networked services simple and easy. Go is also faster, safer, and less memory intensive than most of the legacy competition. For example, Go is less memory intensive than Java and C#, faster than Python and Ruby, and safer than C++.
Rust seems like it may steal some of the spotlights from Go in deeper backend processes that need to get every ounce of efficiency that they can from the hardware. In microservices and polyglot architectures, it makes sense to mix and match technologies behind the scenes a bit.
Even more important than web programming for Rust, I see it being used for more systems-level applications. Rust could easily steal some business from C and C++ for uses in embedded devices, command-line utilities, and so forth.