4 ms·
This is good, but the string handling stuff should be earlier in the tour, because Rust's strings are idiosyncratic (whole blog posts have been written about st
by tptacek 6y ago
This is good, but the string handling stuff should be earlier in the tour, because Rust's strings are idiosyncratic (whole blog posts have been written about str vs. String, an issue that doesn't appear in most other languages). It'd be a nit, but handling strings is one of the most important things you usually need to know to be productive.
I'd love a version of this for people who know Rust that was just Rust idioms, similarly explained. I hang out in Slack channel with a bunch of Rust programmers (because I'm bumbling my way around in Rust as well) and it feels like there's a lot of communally understood idioms that aren't super apparent from the Rust Book.
- steveklabnik 6y agoWe learned the hard way with the Rust book that this is important: one of the biggest structural changes we made between the first and second editions was re-orienting the entire book around "how can we get to Strings quickly", and for exactly the reasons you state. And yeah, the intermediate area is where things are worst now, for sure. It's sorely needed.
- richardanaya 6y agoI think the big difference between Tour of Rust and the Book is my example sizes were meant to be as small as possible to demonstrate one concept at a time. Most of the concepts require no strings at all to explain. Particularly through the procedural programming chapters.
- steveklabnik 6y agoSure. The issue is, it’s something that people run into very early when they try to actually write code. They won’t go through the whole Tour before trying to do so. They certainly don’t with the book :) Anyway the author should do whatever they want. I’m glad folks other than me are writing docs! I haven’t managed to actually go through the Tour yet myself, this is just a riff on the observation made in my parent’s comment.
- richardanaya 6y agoI'm the author here. I can tell you about my methodology for ordering. I immediately talk about text as soon as ownership and structs are explained. In Tour of Rust, I tried to hold to a principle of not explain concepts before their dependent concepts have been mentioned. I believe it's what allowed me to keep most of the pages as simple as possible. I felt the procedural programming aspect was best explained with as little strings as possible, and wanted to get that out of the way as soon as possible.