On Fri, May 17, 2019 at 12:56 AM Konstantin Tokarev <annu...@yandex.ru>
wrote:

> In C++ there is a convention that ugly things should look ugly in code.


Have a reference for that convention?


> Removing element from the middle or beginning of contiguous container is
> ugly thing. If you need such operation in your code, you should consider
> using linked list instead, which allows to remove element with one method
> call (std::list::remove or std::list::remove_if)
>

Yes, because I may need to do it from time to time, so my code has to be
ugly. Makes sense ...
std::list is for linked lists, not for vectors. My use case may not involve
random insertions or removals in the vector, an occasional one - maybe,
that in no way means the library should treat me like an idiot who doesn't
know what he's doing. I can read the docs, I don't need to fight against
the API to do something rather simple.
_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to