Myvideo

Guest

Login

Rust Functions Are Weird (But Be Glad)

Uploaded By: Myvideo
1 view
0
0 votes
0

Rust takes a unique approach to function types, for both closures and fn items. In this video we'll talk about a way to fit these strange function types into your existing understanding of what types are. Then we'll look at how another language (okay, it's C ) does function types in a way that causes poor codegen in generic higher-order functions if you aren't careful--and how/why Rust avoids this problem. Compiler Explorer - Godbolt code samples from the video: C - Rust - *Rust Stuff* fn pointers vs. fn items - #creating-function-pointers Fn (the trait) - *C Stuff* Decay - - std::reduce -

Share with your friends

Link:

Embed:

Video Size:

Custom size:

x

Add to Playlist:

Favorites
My Playlist
Watch Later