Hacker News new | ask | show | jobs
by littlestymaar 2228 days ago
I learned Rust & Go pretty much at the same time, and it actually works quite well because most of the paradigms are actually the same (structs & function implementation on top of them, error as return value). Rust is clearer about the point you mention[1], while Go introduction spend more time explaining things like threads and channels (which I wasn't familiar with), and finally Rust help you to use them properly, thanks to the Send & Sync trait, which make you realize when you're doing racy things.

[1]: https://doc.rust-lang.org/stable/book/ch05-03-method-syntax....

1 comments

Yeah, Go focusing on threads and channels I agree is generally a painful new concept for beginners to learn. I've also seen beginners often "over-correct" and start using channels and goroutines for things they really shouldn't.

How was your learning experience with Rust's borrow checking and pointers? Was it introduced to you early on, or later on?

I learned Rust through the book (first edition), which at this time was the only available material, and it was explained right at the beginning (at least borrowing, ownership and mutable borrows).

I like when things are explained upfront, and actually my biggest issue when learning Rust came from not having the smart pointers (like RefCell and Rc, which relax the ownership constraints) explained at the same times as regular ones.