Ansible Case Study

Ansible seamlessly unites workflow orchestration with configuration management, provisioning, and application deployment in one easy-to-use and deploy platform. Regardless of where you start with…


A first impression of Rust from the perspective of a Go developer

In these uncertain times and multiple months of remote work, at least we have some more time to dive into something new. I have been developing in Go since 2017, learned some TypeScript in the meantime, but few days ago I wanted to get into Rust once again. First time, approximately a year ago I gave up very quickly, realizing that Rust requires lot of time to learn and I didn’t have that much time at the moment.

Go is much easier to learn, it reminds of other popular languages and the only difficult part is concurrent programming, specifically taking care of goroutines’ lifetime and channel communication.

What many people say negative about Go are too verbose error handling and lack of generics. Thus, Rust doesn’t have such problems, error handling is really clean and generics concept is very rich. If you don’t already know, Go will probably have generics implementation at the biginning of 2022, but there are no plans of solving the errors problem. Both in Rust and Go, errors are just values, but Rust handles this in quite remarkable way.

Another advantage of Go is quick compiler. Rust takes much more time to compile the code and also linters take more time to analyze it. So, developing in Rust is definitely slower, specially when you are new to the language.

On the other side, Go has memory management based on garbage collector, just like Java for example, and this may introduce some latency in heavy duty applications, which is not the case with Rust. Rust memory management is probably the best and safest ever and takes almost no extra time to handle. Go has goroutines (green threads), while Rust has real OS threads allowing much deeper hardware access, but it also has higher level libraries allowing green threads, async programming using futures, etc.

To summarize, Rust is difficult to learn but if you plan to do real systems programming or develop extremely performant cloud applications, it is the best choice if not even the only good choice at this moment. It is fun to develop APIs in Go, but once it’s not good enough for your use case, definitely give Rust a try, you won’t regret. It is completely worth spending time learning it.

Add a comment

Related posts:

What is blockchain technology in logistics?

Blockchain is a decentralized and distributed database. This technology is characterized by an ever-increasing amount of information grouped into blocks and stored chronologically. Although it was… Read more

How secure is your info on the web?

Technology is everywhere nowadays and you don’t really see anyone walking around without a phone in their hand. Everyone trusts their phone with information that can be very personal. Privacy is a… Read more

What is art? It might be words

Ready for a wake up? // a poem. “What is art? It might be words” is published by Nicole Rothenay in Med Daily. Read more