3

Crust of Rust: functions, closures, and their traits

 2 years ago
source link: https://www.youtube.com/watch?v=dHkzSZnYXmk
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
0:00 / 1:06:39
LOS ANGELES

Crust of Rust: functions, closures, and their traits

20,328 views
Oct 8, 2021

In this episode, we go over the differences between function items, function pointers, and closures, as well as how they interact with the Fn* traits. We also touch upon dynamically dispatched Fns and experimental const Fn bounds.

I've spliced out some audio issues that occurred on the live-stream, but hopefully it won't be too noticeable :p

0:00:00 Introduction 0:01:20 Rust for Rustaceans 0:02:48 Function items 0:06:26 Function pointers 0:11:24 Function traits 0:20:40 Closures 0:33:49 Non-static closures 0:38:50 dyn Fn 0:49:44 const Fn 1:00:28 for bounds 1:04:06 closures in async fn

Live version with chat: https://youtu.be/QVK4Ooo_PqM

Show lessShow more

50 Comments

Sort by
default-user=s48-c-k-c0x00ffffff-no-rj
Add a public comment...
I might not have the most experience in the world but I've gone through 5 programming languages that I feel somewhat comfortable in, along with all their ecosystem, communities, documentations, tutorials etc. Just wanted to say you sir are making the best programming learning resources I've seen so far. You are truely gifted, thank you so much for sharing your knowledge. Cheers from Poland.

Read more 2 weeks ago (edited)

Jon - Thanks so much for this instructive video. Clearly, the rich and challenging concepts you demonstrate in Rust require careful consideration and exploration before use. Closures are still a challenge to fully comprehend, not because you video lacked anything, but simply because the Rust idiom requies one to carefully design the program's call flow. As an aside, would you be willing to share your .vimrc file and the plug-ins you are using?

Read more 1 week ago

Great video, since I came from C ++ to Rust, it's just great for me to see videos like this at this quality level! I have a suggestion for a possible future video: Since Rust has no inheritance like many languages like Java / C ++, you could possibly make a video showing how object-oriented solutions are made differently in Rust, that would be interesting

6 days ago

Rust and the teaching tools around it have finally helped me escape the "writing bad, unflexible scripts" stage of my programming career. Thanks Jon for all your incredible videos! Can't wait to check out your book.

1 week ago

Jon , thank you so much for resources that you have been sharing for free for the Rust community or anyone interested. Your contents pulled me to Rust and am investigating time to learn it better.

1 week ago (edited)

I was JUST the other day wishing you had a video on closures 😂

2 weeks ago

Preordered the book. I already know I will get $25 worth of value. I already get that with the YouTube channel!

2 weeks ago


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK