3 ms·
I recently got started working with Rust and even though I have pretty decent programming experience in statically typed languages Rust has been quite a challen
by VeilEm 11y ago
I recently got started working with Rust and even though I have pretty decent programming experience in statically typed languages Rust has been quite a challenge. The borrow checker learning curve is very high. Even if you understand the basics you won't always know what macros and functions will be moving things until you run into an error. Lifetime management also requires a bit of time to grok. Some things that are simple in almost any other language can be frustrating in Rust, like someone wrote a book for how to write a linked list in Rust.[0]
My advice is that when you're getting started with Rust, compile often. Don't write a tome of code only to find out later it has no chance of compiling. It gets easier the more you do it, so don't give up, but move in small steps.
[0] http://cglab.ca/~abeinges/blah/too-many-lists/book/ http://cglab.ca/~abeinges/blah/too-many-lists/book/
- nightpool 11y agoto be fair, that book covers 6 different types of linked lists, not just "how to write a linked list". I could write a similarly-sized book (by word count) on different types of linked lists in C++
- VeilEm 11y agoWriting a linked list is pretty hard in Rust for someone new to the language. Perhaps this wasn't as obvious from the book's introduction as I thought it would be.