3 ms·
> That the "simplest of cases" are 90% of what you use 'for' for? Anything that can't be done gets exactly 0% of the usage. I don't know where you got 90% from
by marcosdumay 4y ago
> That the "simplest of cases" are 90% of what you use 'for' for?
Anything that can't be done gets exactly 0% of the usage. I don't know where you got 90% from.
The author clearly comes from a mindset of trying to write Haskell code in Rust. But the criticism is fair, those are 3 very ugly aspects of the language, and it may be possible to improve them without breaking the general behavior... And even if it isn't, it is well worth it to be aware of them.
- coldtea 4y ago>Anything that can't be done gets exactly 0% of the usage. I don't know where you got 90% from. I'm not sure what the first sentence means. Plain iteration across all elements is the most common case for "for". That's where I get the 90% from (meaning, most of the time you'll be doing that). for/in without filters etc., is not something that's just for "hello world" style programs (only useful as a very crude example that you wont find in any real program) - as the author describes it. It's the very opposite: what you will most commony use in every program you write multiple times.