Is Rust old enough for there to be a 'modern' Rust?
How to Learn Modern Rust
21–30 of 67 posts
Re: How to Learn Modern Rust
#22Is Rust old enough for there to be a 'modern' Rust?
Re: How to Learn Modern Rust
#23Re: How to Learn Modern Rust
#24The substring section[1] looks a bit weird though. If you're learning Rust, diving right into how to work with char indices instead of byte offsets does not feel like the right thing to cover right away. You might really need that, but chances are you don't and would be much better served by a section that talks about how you probably don't want char offsets at all. But even that doesn't seem like you should whack a beginner with right away unless they have a specific hang-up on it.
Beginner string stuff should be talking about string representation and going over the &str and String APIs. And depending on how early you get to it in the overall tutorial, probably using it as a springboard to talk about lifetimes.
But writing code so you can go out of your way to do something that is probably wrong in the first place? Noooooo.
Anyway, sorry to pick at this specific point, but the Gell-Mann amnesia effect comes to mind.[2]
[1]: https://github.com/joaocarvalhoopen/How_to_learn_modern_Rust...
[2]: https://en.wikipedia.org/wiki/Michael_Crichton#GellMannAmnes...
Re: How to Learn Modern Rust
#25Is Rust old enough for there to be a 'modern' Rust?
Re: How to Learn Modern Rust
#26My first piece of advice is to just start writing code. If you are not specifically interested in super high performance systems level code, my second piece of advice would be to write code that avoids lifetime annotations until you get the basics of the borrow checker down. For me, this meant writing a gRPC API with Rust using `tonic` with a `diesel` based persistence backend and observability with `tracing` and `op…
Just start coding while avoiding lifetimes is great advice, but that's easier said than done. Rust makes some hard things simple and exposes hidden complexity in things you thought were simple. Maybe I'd reframe it as "just start writing code, and use RC liberally to avoid lifetimes until you get a handle on them." Also avoid async for that first project too.
Re: How to Learn Modern Rust
#27Can I get a job with Rust?
Re: How to Learn Modern Rust
#28Re: How to Learn Modern Rust
#29Re: How to Learn Modern Rust
#30I’d say the guide to learn modern rust could be much simpler - read The Book, write some code, and listen to Clippy (the linter) and apply rustfmt regularly.
Almost all Rust code out there looks similar to each other because they pretty much follow this process - follow the standard linter and code formatter. The best part is, each Rust release introduces few changes so it’s easy to stay in tune with best practices.