comprehensive-rust
comprehensive-rust copied to clipboard
Fixes to unsafe chapter
Added speaker notes, safety comments, and a couple more pages.
and a couple more pages
Hey Andrew! I like the content a lot that you're adding, but... I would suggest that you try it out first before we commit it as-is. Other instructors, like @maurer and @fbornhofen, might have different experiences, but my experience is that the days are very full. That is, the course as it was in ~December was already near the breaking point in terms of content.
It might not look very full, and we had a comment in #38 where @shinglyu suggested that Day 1 morning could fit into a 1 hour lecture. That's not my experience, at least not when the discussions start flowing.
I guess what I'm saying is that we should know more in a few days when you've had a chance to teach the material here. Is that okay, or do you think it's important to commit and publish it so that your attendees can find the material shown during class at https://google.github.io/comprehensive-rust/?
and a couple more pages
Hey Andrew! I like the content a lot that you're adding, but... I would suggest that you try it out first before we commit it as-is. Other instructors, like @maurer and @fbornhofen, might have different experiences, but my experience is that the days are very full. That is, the course as it was in ~December was already near the breaking point in terms of content.
Yeah, there is a lot to cover. The course is called Comprehensive Rust though, and right now the introduction to the unsafe section mentions unsafe traits without explaining them, and doesn't talk about defining unsafe functions at all. These are things that often trip people up, and will come up especially with people writing no_std code, so I think it's important to at least cover them briefly.
It might not look very full, and we had a comment in #38 where @shinglyu suggested that Day 1 morning could fit into a 1 hour lecture. That's not my experience, at least not when the discussions start flowing.
I guess what I'm saying is that we should know more in a few days when you've had a chance to teach the material here. Is that okay, or do you think it's important to commit and publish it so that your attendees can find the material shown during class at https://google.github.io/comprehensive-rust/?
I need to have it somewhere so I can teach it, but I guess I can merge everything into my fork for now.
So far, I'd also say that we already have a lot of material. At the same time, I agree with the reasoning that "comprehensive" course shouldn't leave out important information. As a facilitator, I like to cover all topics in the outline at least superficially, and then go deeper into topics that the participants are interested in. I'm also ok with skipping over some slides when time is running out and the topic seems too advanced.
However, if we end up with slides that start resembling the Rust book, facilitators have to curate topics once again. One easy solution could be extra sections with supplementary materials and exercises for topics that are worth a deep dive, and pointers to those materials in the main slides. WDYT?
So far, I'd also say that we already have a lot of material. At the same time, I agree with the reasoning that "comprehensive" course shouldn't leave out important information.
Yep, and I think the content here is a great addition! So I think we should merge it, and then we'll massage it a bit as we go forward.
facilitators have to curate topics once again
That is a good point: this whole course was in some sense created because sources like Rust by Example are too large to be taught in a course.
One easy solution could be extra sections with supplementary materials and exercises for topics that are worth a deep dive, and pointers to those materials in the main slides. WDYT?
I think we'll slowly work towards doing precisely that. We'll eventually have a section about async Rust #181 and I hope we can add more specialized topics. When that happens, we can give suggested paths through the material to fit a course in 3, 4, or 5 days.
I taught this yesterday, and got through it slightly quicker than expected, about 1:40 for day 3 afternoon including a bunch of questions. Error handling took a while with lots of questions, but testing was pretty quick to cover and there weren't any major questions, so we had plenty of time to cover the unsafe chapter.
I was very glad to have the 'Writing Unsafe Functions' example in, because that was one of the first things people asked about. The zerocopy example for unsafe traits was also useful, not just as an explanation of unsafe traits, but also because people were asking about safe wrappers of unsafe code and converting between types, and zerocopy is a good example of how to do that safely.
If I were to skip anything from the unsafe chapter it would be the pages on unions and mutable statics, because they are very rarely used in practice.