Suggested content #156
CasperN
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
Hi @CasperN, thanks a lot for posting this! I converted the "issue" to a "discussion" simply because discussions can have threaded comments, which I think can be useful here. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, here's some suggested content based on my experience teaching the course
I think modules are not very interesting can be pushed to the last day. If we assume the audience can program in some other language, then the rest of the day 2 content (control flow and syntax) can be squeezed to the day 1 afternoon. That means the audience has to wait until the second day to see the famous borrow checker and talk about memory management but that can just be more motivation to show up :)
An exercise that forces people to use pattern matching, result types, option types, and the
?
operator (ideally all at once), but only using Copy types. This will let people see these important APIs and learn some pattern matching syntax before running into the borrow checker. Ideally this will force people to read the docs about methods on Options and Results since these types show up everywhere.#[derive(Copy)]
and generics likeOption<Foo>
around but instructors can give a very brief hand-waved explanation for what those areDesigning the HashMap API: There's a lot to say about it wrt generics, trait bounds, and associated types.
K: Borrow<Q>
andQ: Hash + Eq + ?Sized
, this is a good example of putting trait bounds on associated typesImplementing an Iterator: Here's a contrived example that will let you talk about lifetimes, the index trait, and the impl trait syntax.
Beta Was this translation helpful? Give feedback.
All reactions