i think rusts composition is problematic. you can have two abstractions that if you mix them the outcomes are not what you expect unless you have a deep understanding of the details, (e.g. clone/iter) and rust is all about hiding details from you.
I really couldn't disagree more. Rust doesn't hide those details at all. APIs tend to be extremely explicit. I have never run into the issue you're describing in rust, I have run into it far more in other languages where mutability and sharing are implicit.
Comments
i think rusts composition is problematic. you can have two abstractions that if you mix them the outcomes are not what you expect unless you have a deep understanding of the details, (e.g. clone/iter) and rust is all about hiding details from you.
I really couldn't disagree more. Rust doesn't hide those details at all. APIs tend to be extremely explicit. I have never run into the issue you're describing in rust, I have run into it far more in other languages where mutability and sharing are implicit.
the existence of iter is to hide implementation detsils from you.
I don't understand what you mean at all. Iter is just a trait. There's nothing special about it.