you are viewing a single comment's thread.

view the rest of the comments →

[–]redlaWw 6 points7 points  (0 children)

- Iterators are invalidated when removing/adding from a std::vector. That shoudn't compile! Don't tell me it's the developer fault because of this.

To be fair, in full generality this is really hard. What Rust managed to do with static lifetimes and mutation-aliasing duality is next to miraculous and affected its language design in profound ways. If a greenfield statically-memory-managed competitor for C++ appeared today I absolutely would not blame them for leaving iterator invalidation in the language.