Toptube Video Search Engine



Title:Rust Functions Are Weird (But Be Glad)
Duration:19:52
Viewed:127,231
Published:13-07-2023
Source:Youtube

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 - https://godbolt.org/ Godbolt code samples from the video: C++ - https://godbolt.org/z/xo83Ecfqb Rust - https://rust.godbolt.org/z/E5fvaxWPM *Rust Stuff* fn pointers vs. fn items - https://doc.rust-lang.org/std/primitive.fn.html#creating-function-pointers Fn (the trait) - https://doc.rust-lang.org/std/ops/trait.Fn.html *C++ Stuff* Decay - https://en.cppreference.com/w/cpp/types/decay Boost.TypeIndex - https://www.boost.org/doc/libs/1_82_0/doc/html/boost_typeindex.html std::reduce - https://en.cppreference.com/w/cpp/algorithm/reduce Ranges - https://en.cppreference.com/w/cpp/ranges static - https://en.cppreference.com/w/cpp/language/storage_duration I use the amazing Manim library for animating these videos, and I edit them with Blender and Audacity. https://www.manim.community/ https://www.blender.org/ https://www.audacityteam.org/



SHARE TO YOUR FRIENDS


Download Server 1


DOWNLOAD MP4

Download Server 2


DOWNLOAD MP4

Alternative Download :