Interview: Go / Rust, what's new?

by | 23 Feb 2021 | Web Expertise

Go (also known as Golang) and Rust are two languages that are often compared to each other. Relatively young, these languages are still evolving and gaining popularity among developers and companies. Explanations with Thomas Barusseau, Lead Developer at theTribe.

Go and Rust were respectively created by Google and Mozilla about ten years ago. Where are they today?

Indeed, Go and Rust are about the same age. Go had an obvious traction, being a project created by Google engineers and one of the objectives of which is the developer's productivity. Rust started as a personal project that was eventually sponsored and then abandoned by Mozilla. They share many similarities(runtime safety, performance, modern paradigms) and both are used in production by many companies.

These languages are popular in surveys by developers who appreciate their simplicity and security. What about companies? Have they adopted them in their projects?

Simplicity is true for Go, and this is one of its strengths: the syntax is similar to C (which everyone knows), the execution of concurrent code is very simple(goroutines). The same can't necessarily be said for Rust, which has a rather severe learning curve.

On the business side, we find Google (surprise!), Uber, Twitch, Dailymotion using Go. On the Rust side, we can find Microsoft, Dropbox, Discord, Yelp. Both languages have clearly made a breakthrough.

For what types of projects are these languages suitable and with which development ecosystem?

This is the strength of these two languages: they can be used to develop any kind of program (although I doubt Go can be used seriously in an embedded context). In addition to being "general purpose languages", they both have tools that can eliminate runtime errors or at least move them to compilation. 

For memory management, Go is based on agarbage collector. Rust, on the other hand, differs from other languages by using a "lifetimes" model of resources. The compiler tracks the lifetimes of all the resources in a program, and knows exactly when in a program memory can be released automatically. So to answer simply: these languages also gain traction, because there is no disadvantage in using them (except perhaps a sometimes disappointing ecosystem compared to JavaScript or Python).

What do you think the trend for these two programming languages will be for the next 2-3 years?

Unfortunately, I don't use Go enough to answer this question! As far as Rust is concerned, I know that there are many new features being stabilized, many of which revolve around the generics. Since Rust offers tools that are completely different from what can be found in most other languages, the community is working to agree on the best way to handle GUIs, or error handling. But it has to be said that sinceasync/await stabilized in November 2019, language development has calmed down: we have just about everything we need to do anything and everything comfortably.

Will Google's announcement of a Go 2 for 2021 with more stability change the trend?

I know that the type parameters (generics) are scheduled for February 2022. I don't use Go enough to understand how important this is: the language has been deliberately designated without generics, for reasons of performance and simplicity. A program can never be too stable: if they manage to keep their promises, it can only be good for the ecosystem and the language.

What is the benefit for a company to use these languages?

Companies have every interest in using these languages: we have seen this with the timid adoption of Kotlin or Scala, which were able to impose themselves against Java in companies that had literally been using it for decades.

Developers (and companies) want modern tools that allow them to be productive and express themselves freely. Developers want languages that give them strong guarantees even before the program runs. Developers want complete languages, which allow them to easily manage dependencies, build, test. If you work in a domain such as the web where these languages have an already vibrant ecosystem: go for it!

Florian Compain

Florian Compain

Chief Marketing Officer @theTribe

Why don't we talk?