DEV Community

Discussion on: The Borrow Checker and Memory Management

Collapse
 
krusenas profile image
Karolis

I would identify myself as mainly a Go developer but in some cases I wish I wrote few services in Rust :) Especially where something is really simple and just need to take care of used memory.
The approach that I took in learning Rust was first reading a book, then do a small service, then more github.com/rust-lang/rustlings to better understand various types and their use cases.

All in all, Rust is not an easy language and I am still far from being comfortable when writing code in it. I hope it will change. Agree regarding unit tests, compared to Go's unit testing they are not straightforward, well... nothing is in this language :D But it's fun!

Collapse
 
strottos profile image
Steven Trotter

Honestly, I'd say if it's simple there's not much point in learning Rust for this purpose unless performance is really critical. I'd stick to Go in this case. If you feel like unhappy with Rust then maintainability alone should be a good enough reason.

That said though I really think Rust is workable and not as hard as people think. I've come across articles before complaining that "Rust can't do this thing" and I've tried it and it works fine so I think it's come and is still coming a long way. Really my aim here is hopefully to make people realise some of the "hard" things aren't as bad as they seem, and maybe to get a few people to give it another go as I'm pretty sure it's better than it used to be a few years back.

But yeah, it's not easy, but I think it's worth it and I think it'll be a super valuable skill in time. I think it's time is yet to come I guess.

Collapse
 
strottos profile image
Steven Trotter

Thanks for reading anyway. Hope you enjoyed it or gained something from it. There is more to come hopefully when I get time :)