Skip to content

Conversation

randomPoison
Copy link
Collaborator

I've been thinking it'd be simpler to introduce dyn Trait via &dyn Trait rather than waiting for the smart pointers section and Box<dyn Trait>. This PR adds a slide to the Generics section that introduces &dyn Trait and compares it to &impl Trait, juxtaposing monomorphization and static dispatch against type-erasure and dynamic dispatch. I've then updated the existing trait object slide to call back to the earlier introduction, and call out that using Box<dyn Trait> gives you an owned trait object rather than a borrowed one.

@randomPoison randomPoison requested a review from djmitche May 30, 2024 00:38
Copy link

github-actions bot commented May 30, 2024

Changes to Course Schedule

This PR changes the course schedule. The new schedule is shown below.

Fundamentals // Day 1 Morning

2 hours and 5 minutes: (1 hour short)

  • Welcome - 5 minutes
  • Hello, World - 15 minutes
  • Types and Values - 40 minutes
  • Control Flow Basics - 40 minutes

Fundamentals // Day 1 Afternoon

2 hours and 35 minutes: (25 minutes short)

  • Welcome - 0 minutes
  • Tuples and Arrays - 35 minutes
  • References - 55 minutes
  • User-Defined Types - 50 minutes

Fundamentals // Day 2 Morning

2 hours and 10 minutes: (55 minutes short)

  • Welcome - 3 minutes
  • Pattern Matching - 1 hour
  • Methods and Traits - 50 minutes

Fundamentals // Day 2 Afternoon

4 hours and 5 minutes (⏰ 1 hour and 5 minutes too long)

  • Welcome - 0 minutes
  • Generics - 45 minutes
  • Standard Library Types - 1 hour and 20 minutes
  • Standard Library Traits - 1 hour and 40 minutes

Fundamentals // Day 3 Morning

2 hours and 20 minutes: (45 minutes short)

  • Welcome - 3 minutes
  • Memory Management - 1 hour
  • Smart Pointers - 55 minutes

Fundamentals // Day 3 Afternoon

1 hour and 55 minutes: (1 hour and 10 minutes short)

  • Welcome - 0 minutes
  • Borrowing - 55 minutes
  • Lifetimes - 50 minutes

Fundamentals // Day 4 Morning

2 hours and 40 minutes: (25 minutes short)

  • Welcome - 3 minutes
  • Iterators - 45 minutes
  • Modules - 40 minutes
  • Testing - 45 minutes

Fundamentals // Day 4 Afternoon

2 hours and 10 minutes: (55 minutes short)

  • Welcome - 0 minutes
  • Error Handling - 55 minutes
  • Unsafe Rust - 1 hour and 5 minutes

Android // Android

10 minutes

  • Welcome - 0 minutes
  • Setup - 0 minutes
  • Build Rules - 0 minutes
  • AIDL - 0 minutes
  • Testing - 10 minutes
  • Logging - 0 minutes
  • Interoperability - 0 minutes
  • Exercises - 0 minutes

Copy link
Collaborator

@djmitche djmitche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it! Looks like this needs a dprint fmt before merging though.

Looking at the course timings, do you think it makes sense to move generics into day-2 morning?

@randomPoison
Copy link
Collaborator Author

do you think it makes sense to move generics into day-2 morning?

Didn't it used to be in the morning? iirc I moved it to the afternoon because I was consistently only getting through the pattern matching and methods sections in the morning.

@djmitche
Copy link
Collaborator

Oh, you're right. We should probably adjust the timings to match!

@randomPoison
Copy link
Collaborator Author

We should probably adjust the timings to match!

Ah yeah, i think we can just reduce the std types and traits to 1 hour each, that's closer to how much time I spend on each of those. Did you want me to do that in this PR?

@djmitche
Copy link
Collaborator

Nope, I was just waiting for the dprint fmt, which I see has occurred. If you want to make another PR that'd be great!

@djmitche djmitche merged commit 59bf3bd into main May 31, 2024
@djmitche djmitche deleted the legare/dyn-trait branch May 31, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants