They maybe rear their ugly head but they also allow you to collect the iterator into any collection written by you, by the standard library or by any other crate.
While in python you have list/dict/set/generator comprehension and that's it.
While in python you have list/dict/set/generator comprehension and that's it.
But you have to admit that is a pretty noisy line that could be difficult to parse.
let new_array: Vec<usize> = array.into_iter()
.filter(|&x| x != 0)
.map(|x| x * 2)
.collect();
Isn't so bad. let array = ["DE", "AD", "BE", "EF"];
let new_array: Vec<u32> = array.into_inter()
.map(|x| u32::from_str_radix(x, 16))
.collect()?;
In this case you need to specify the Result generic type on generic. This has come up for me when working with Stream combinators. Most projects probably end up in needing some lifetime'd turbofish and you have to be able to parse them. They aren't rare enough, IME, to argue that Rust isn't noisy.