Rust for Rustaceans Book Club: Chapter 2 - Types

preview_player
Показать описание
Join us as we work through the excellent Rust for Rustaceans by Jon Gjengset together. The book is an excellent next step for diving that little bit deeper into understanding Rust. To get the most out of these sessions, reading the chapter before hand is strongly recommended, but not required.

This session will cover Chapter 2: Types. This chapter dives into how different types are laid out in memory, the ins and outs of traits and trait bounds, existential types, and the rules for using types across crate boundaries in Rust. Along with Chapter 1, it sets us up with the core essentials needed for the rest of the book.

Useful Links:

Presenter(s): Matt

Meetup info:
You can also find us on discord, drop us a message to be sent the link.

Big thank you to Esri for sponsoring our meetup page
Рекомендации по теме
Комментарии
Автор

Hey! Thanks for great video! I have question at @20:09 slide because I felt awkward to see dynamic dispatch is more CPU cache efficient. Can I have more context? What I have in my mind is, since static dispatch is determined at compile time, it may take advantage of locality. Did I misunderstand this point? I know this use vtable, but this will cause some miss. Thank you for your great video again! It was really helpful to understand this hard language!!

kimsdo
Автор

8:42 I believe the compiler optimization that takes some values or bits from other fields to be used by enumerators tags is called ‘niche optimization’

Roibarkan
Автор

Thanks for the talk (and thanks for making all of them available online!)

At 39:10 there is a small mistake in the code snippet : `Authenticated` and `Unauthenticated` are written as type aliases, not marker types. This should rather be `struct Authenticated;`.
Note that type aliases will actually compile, but will not work as expected because would be equivalent to `SshConnection<()>` that would be equivalent to