DEV Community

Discussion on: Oops, I Did It Again...I Made A Rust Web API And It Was Not That Difficult

Collapse
 
lexiebkm profile image
Alexander B.K.

Recently I started to consider a compiled language for backend. Currently I am still learning Go aka Golang. Actually I want to use Java, but it will take longer time to learn if I have to proceed to J2EE aka JEE, although Spring framework (Spring Boot) will help quick development.
I have read about Rust a couple years ago, but didn't really want to get started, seeing that it would only fit to system or embedded programming like C/C++.
But when I read an article from qvault.io/rust/rust-vs-go-in-backe...
my mind was open again. Still, I think I don't have time to learn Rust. Maybe, after sufficient learning and working with Golang, I will spend time to read its documentation again.

Collapse
 
deciduously profile image
Ben Lovy • Edited

Go is a tough competitor in terms of web servers. In my limited experience, Go really excels in that space above anything else I've used. I think Rust will ultimately provide better low-level control and general expressiveness, but pragmatically Go might be more than sufficient for a wide swath of web service use cases. Java fits the bill too. There's a lot of types of applications for which Rust is probably overkill.
Once you've invested the time and energy to get over the hump it's likely capable of comparable productivity, but the learning curve is definitely steeper, so you have to decide up front if it's worth the time and energy.

If you're just curious, I mean, yeah. Come on over :)

Collapse
 
lexiebkm profile image
Alexander B.K.

I have visited the Book again. And like the last time I read a bit about it, I jumped and read a bit about its unique thing : Ownership. I like reading the section that discussed Stack and Heap; this at the same time reminded me of C++ that I wanted to relearn in the correct way (like reading from Stanley Lippman's book of C++ Primer).
I am also glad seeing that Rust provides Struct like in C/C++, and how it defines methods in the context of Struct, Enum or Trait, although it doesn't provide Classes and Inheritances via classes. This way of defining methods immediately reminds me of how Go defines methods using Receiver argument in the context of certain types such as struct.
Therefore, I feel like at the same home when trying to learn Rust in parallel with Go, and actually C/C++ too, since they provide structs and pointers.