DEV Community

Khair Alanam
Khair Alanam

Posted on

Would you rather choose Rust or Golang?

When it comes to programming languages, I am proficient in Python and JavaScript. However, I wanted to learn a language that deals with low-level stuff and thought of learning Rust. So far, I have enjoyed a lot about Rust including the concept of ownership, borrowing, structs and impls etc. I am learning Rust since I wanted to use it for a side project.

What are your opinions? Rust or Golang? I heard Golang is pretty good option when it comes to usage and the number of jobs that ask for Golang.

Top comments (4)

Collapse
 
sjmulder profile image
Sijmen J. Mulder

I think that if you're interested in system-level programming (as you seem to be) Rust is the better choice. While go has a low level vibe to it some senses it's a garbage collected language, has its own threading primitives and leans strongly on dynamic dispatch. Rust gives you control over memory and threading and dispatch and generics are more deliberate.

Collapse
 
khair_al_anam profile image
Khair Alanam

That's pretty insightful on both Rust and Golang. Thank you so much!

By the way, have you worked on both of these languages? What was your experience with them?

Collapse
 
sjmulder profile image
Sijmen J. Mulder

I've only studied them and experimented, no real projects in either. I do package some software written in Go so I get to dive in and fix one thing or another every so often.

With Go I really liked the super fast compiler, simplicity, C aesthetics, its interface system and the coroutines. For Rust, the borrow checker is a great invention and I like that it's very explicit about everything. I dislike the slow compiler, the complexity and the culture.

Thread Thread
 
khair_al_anam profile image
Khair Alanam

That's really interesting to note about Rust tbh. But yea, to each is their case. But thank you so much for sharing your experience!