3 ms·
> For example, idiomatic foreach block in Rust is a syntax sugar of passing lambda, which is more friendly to parallelism This changed with the recent 0.8, `fo
by dbaupp 13y ago
> For example, idiomatic foreach block in Rust is a syntax sugar of passing lambda, which is more friendly to parallelism
This changed with the recent 0.8, `for` is now syntax sugar for using the Iterator trait, which optimises exactly like C++ (the vector iterator even vectorises when LLVM can do it).
Rust has actually moved to have iterators that are very similar to (a subset of) D's ranges.