intorust / intorust.com

Learn Rust real good.
Other
304 stars 25 forks source link

Suggestions for more topics #12

Open rjammala opened 7 years ago

rjammala commented 7 years ago

@nikomatsakis Thanks for doing this. These videos/exercises were very helpful.

When you get a chance, please also cover the following topics:

  1. traits
  2. Explicit life times.
  3. Macros.
  4. Pattern matching.
swuecho commented 7 years ago

I care more about 2,4,1.

Macros is too advanced for Intro.

swuecho commented 7 years ago

&str vs &String

in Mutable borrows, 21:56. &String is changed to '&str'. no explanation of why.

all the small program I write in rust are text related. string in rust is really confusing to me.

a video on string or text processing will be great.

oylenshpeegul commented 7 years ago

There was some discussion of &str vs &String in the previous video. At 11:13 of Shared borrows, he talks about changing &String to &str in the helper function. That explanation made it clear to me why &str would be preferable (it's more flexible). What wasn't clear to me was why we are allowed to do it. That is, why isn't it a type violation to hand a &String to a function expecting a &str?

I found the answer in the Strings documentation

Strings will coerce into &str with an &

I didn't think automatic coercion was the norm for Rust. This is apparently part of something called deref coercions.

So, yeah--- I agree--- a lot more could be said about strings. I think a video on text processing would be a fine idea.

nikomatsakis commented 7 years ago

I have two videos coming:

After these I hope to do a bit more lifetime material, but I'll probably also start in on traits, as we have some slide decks for these already built. I'd love to do matching and enums too eventually.

nixpulvis commented 7 years ago

Learning how to use Rustdoc, even though it's really simple might be worth highlighting. I'm not sure if we want to dive into the terminal or not, but at least some shots from docs.rs, and the STD lib would be great.

Maybe two sections, one for the language, and one for the ecosystem (cargo, rustdoc, etc).

rjammala commented 6 years ago

@nikomatsakis : Thanks for all the videos. Do you have any timeline for the rest of them?