Let's talk about Python and Rust. I used to do a lot more Python than I do now, but I still love it for its beauty.
One of the first things I was missing in Rust when coming from Python were List Comprehensions. It took me a while to figure out, that the Rust way - using iter(), filter(), and map() - actually is a better fit for the language. I want to show you how to port Rust list comprehensions to Rust.
If you like to get notified about new episodes, please subscribe to my channel 😊.
Keywords: iterators, map, filter, Entry API, List comprehensions
- Reading files using the Rust Cookbook.
- DevDocs is a nice Rust documentation viewer. Also supports a ton of other languages and works offline.
- Iteration patterns for Result & Option
- Experimenting with Python is much cooler with Jupyter (or IPython) notebooks. I've added an example to the code section.
- If you really need list comprehensions, you could use cute, which is a set of macros that make this syntax possible.
- Colorscheme: Gruvbox Dark
- Intro song: Aries Beats - Night Ride (https://www.youtube.com/watch?v=AOvr_57BMZo)
Preparing, recording, and editing an episode takes a substantial amount of time (around 30 hours total). I do all of this next to my fulltime dayjob. If you want to show your appreciation and help me keep the content free for everybody to enjoy, please consider sponsoring me on Github - no matter the amount. ❤️