3 ms·
I am not so sure, I've seen examples of Rust code where I had no idea what was going on, the syntax is heavy (e.g. sigils), it's encouraging functional idioms a
by blub 10y ago
I am not so sure, I've seen examples of Rust code where I had no idea what was going on, the syntax is heavy (e.g. sigils), it's encouraging functional idioms and introduces several concepts in addition to C++ besides ownership. I don't have time to list them, anyone can find what they are.
How many C or C++ programmers will understand this: (1..n + 1).fold(1, |accum, x| accum * x)?
Anyway, I am just offering my opinion as someone doing mostly C++ programming. I have no problem with a language like Swift or Go, but feel that Rust is too complicated for what it offers.
Taking a pointer into containers refers to &p.second. We now have a pointer to an iterator's member variable. That is unreasonable.
The reasonable thing would be to use an interator to keep track of the selected item, this is what they are designed for.