Hacker News new | ask | show | jobs
by burntsushi 1377 days ago
A lot of the links look reasonable.

The 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...