4 ms·
It is not a "hack". It is the behavior that I expect from a dynamically resizable array. std::vector in C++ does it, so does Vec in Rust, and they are not dyna
by debt93 5y ago
It is not a "hack". It is the behavior that I expect from a dynamically resizable array.
std::vector in C++ does it, so does Vec in Rust, and they are not dynamic languages with GC.
- pjmlp 5y agoWhich std::vector though? ISO C++ places no such requirement on std::vector, each implementation is free to choose their own implementation provided it matches the O() notation requirements. C++ is not like Rust where the implementation dictates the semantics.