[Development] QHash for Qt 6

André Pönitz apoenitz at t-online.de
Fri Dec 20 20:01:22 CET 2019


On Fri, Dec 20, 2019 at 02:47:06PM +0100, Giuseppe D'Angelo via Development wrote:
> Il 20/12/19 12:20, Philippe ha scritto:
> > std::unordered_map is before all an interface and the implemenation varies according to the library supplier.
> > And this, potentially much more eg. than std::vector.
> > And X-Platorm Qt users would expect performance consistency I guess.
> 
> Devil's advocate, again: this also applies, say, to std algorithms. Or
> operator new. Should we stop using them and roll our own?

Erm, yes, at least where it provides a benefit. 

E.g. the ones conveniently operating on whole containers instead of
iterator pair.

Qt had them, someone threw them out, and I doubt that Qt Creator
is the only "user" project that had to re-create them locally.

>  [...]
> And my point was that Qt shouldn't _really_ bother reinventing something
> already easily available elsewhere.

Correct. But these cases are very rare.

Specifically, "something that's already easily available elsewhere"
may not provide
    - the same level of convenience (see algos + full containers)
    - the best theoretical performance (std::unordered_map)
    - consistent (with the rest of Qt) naming (std::*)

Andre'


More information about the Development mailing list