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 -
1 view
1087
359
3 months ago 00:04:03 14
Gorgeous 1972 Chrysler Imperial LeBaron
4 months ago 00:06:51 1
Inside a Secluded Island Cabin On The Edge of a Cliff (Cabin Tour)
4 months ago 00:00:58 2
Why Rust Cohle Drinks Beer in True Detective
4 months ago 00:13:30 1
Turning Unused Oil Can into Useful Vessels - Amazing Technics & Process
4 months ago 00:02:53 1
Marvin, the Paranoid Android - A Side: Marvin [HQ Sound + Lyrics]
5 months ago 01:17:45 1
Volkswagen VW T3 Bus 1/25 Scale Model Kit Build How To Assemble Paint Decal Glass Open Doors
5 months ago 00:24:13 1
Restoration Georgian Broadsword with a Skirt - RARE TYPE
5 months ago 00:16:10 1
Making a Rugged Chopper Knife from a Rusty Truck Leaf spring
6 months ago 00:14:00 1
Loading Tons of Rock Into 70 year old Rusted Soviet Truck
6 months ago 00:18:32 1
INCREDIBLE Bicycle RESTORATION |Transforming A Trash Bike Into A FUJI Mountain Bike
6 months ago 00:05:41 1
1934 Ford Coupe, Gateway Classic Cars Louisville #3062 LOU
7 months ago 00:13:27 1
1973 Plymouth Duster for sale at Volo Auto Museum (V20352)
7 months ago 00:44:37 1
Discover the Secrets of Wabi Sabi: Transforming Your Rustic Farmhouse
7 months ago 00:18:05 1
Biggest Cleaver In The World Restoration
7 months ago 01:00:39 1
Intro to Roc & Innovation in Functional Programming • Richard Feldman & James Lewis
7 months ago 00:03:15 1
134265 / 1969 Plymouth Road Runner A12
8 months ago 00:06:00 6
1970 Chevrolet El Camino For Sale- Gateway Classic Cars Scottsdale #622