4 ms·
Agree with the iteration variable being far from the iterated structure. Also so many special characters for such a simple construct! While I do like {} langua
by panzi 4y ago
Agree with the iteration variable being far from the iterated structure.
Also so many special characters for such a simple construct! While I do like {} languages, this has () || {} whereas e.g. Rust would only have {} in that case:
for x in xs {}
However, Rust's zip is much more cumbersome:
for (x, y) in xs.iter().zip(ys.iter()) {}
A bit more reasonable with the zip function:
use std::iter::zip;
for (x, y) in zip(xs, ys) {}
You still need the () to match the tuple. Would be cool if that wouldn't be needed. And it still removes the connection between multiple iteration variables and their iterated structure. hmmm