Rust's iterators are more interesting than they look

preview_player
Показать описание
Manually creating for loops is error prone and tedious. Learn about how Rust provides tools that make many common errors impossible to create, without incurring runtime costs.

🦀 Rust resources:

👋 Connect with Tim:

👍 Like this video if you found it helpful, and share it with your friends who are also interested in Rust programming.
Рекомендации по теме
Комментарии
Автор

Wait. Am I losing my mind or are you saying "integer" instead of "iterator" the first two times in the video/in the first 10 seconds?

darklajid
Автор

As usual, Tim, thank you for the explainer and the great content.

I had a question and a correction:
1. At 13:37 - any reason why `Option<<I as Iterator>::Item>` should not be re-written more concisely as `Option<Self::Item>`? The compiler doesn't seem to mind/complain.
2. At 13:51 - there is an error - `if some.remaining_iterations`, but it should be `if self.remaining_iterations`

pbnjdev
Автор

When I was going into Rust, it first really confused me, how obsessed Rust with iterators is. It's almost impossible to loop collections by indices and do some weird stuff by indices hopping. If you are coming from C++, this should be easy.

But one big advantage in Rust: Because the iterators are so standardized and all over the place, you can swap the underlying data structure really easily (as long as the iterator-trait is implemented).
So you don't have to mind for the perfect data structure at the beginning by casting the data structure into the design of your program. You can swap the data structure later on (by benchmark testing or if the requirements for the project are changing).

michaelmueller
Автор

I am a fan of the slides' design. Had to say that, content as always very nice :)

pixelsandpointers
Автор

Hey Tim!
Thanks for this great educational resource. 🤓
I'm currently learning Rust and this video perfectly closes the gap between the knowledge I've gained from the Rust book and the questions I've personally had about iterators. One thing I find difficult as a learner is understanding how to figure out which iterator methods can be chained and which cannot.

philippschulz
Автор

@timClicks: 💡Thank you for this excellent video..may I ask which tool you use for the presentation ? Very well presented !!

pramodjingade
Автор

A nice video for Rust learners. btw can you tell me the code font you used in the slide?

ivanchien
Автор

It’s sad that this is so foreign and absurd to most so called senior developers.

thegeniusfool
Автор

As a bit of constructive criticism, I would practice the voiceover once or twice before recording the final take, and read from a script if you aren't already. The ums and ahs distracted from the really quite high-quality slides.

jackkendall