[Development] QHash for Qt 6

Vitaly Fanaskov vitaly.fanaskov at qt.io
Fri Dec 20 16:05:15 CET 2019


> I'm not totally sure I understand this point. What do you mean by 
> "memory management"? 
Inside of containers you need to allocate and de-allocate memory. If 
container is passed across a library boundary, there is a question what 
version of new/delete should be used. But this can be "easily" solved by 
providing allocators. Probably.

> Binary compatibility of stdlib is not an issue
So, you think that this is easy to achieve binary compatibility with 
many C++ compilers and standard libraries we have? For example, if Qt is 
built with one version of MSVC, but used in a program build with another 
version of MSVC. This is nice if there are some guarantees at least for 
main platforms. I heard that gcc and clang give some guarantees, but 
this not enough, I think.

> consistency for containers shouldn't really be either
Regarding consistency, it's not only containers' implementation. This is 
also about Qt APIs consistency: if it will be decided using std::* 
containers, they should be used instead of all Qt containers, but not 
instead of some of them. I guess, we should provide more or less solid 
user experience.

On 12/20/19 3:10 PM, Giuseppe D'Angelo wrote:
> Il 20/12/19 13:54, Vitaly Fanaskov ha scritto:
>> This is not that easy to use std::* containers because at least the 
>> following issues have to be addressed:
>>
>>   * Memory management
>>   * Binary compatibility
>>   * Implementation consistency
>>
>> You probably can provide, for example, some allocators, relax 
>> compatibility requirements and so on...  The question only is whether 
>> this is worth doing or not.
>
> I'm not totally sure I understand this point. What do you mean by 
> "memory management"? (Binary compatibility of stdlib is not an issue, 
> and implementation consistency for containers shouldn't really be 
> either).
>
>>
>> Personally I tend thinking that this is better to maintain, extend 
>> and improve what we already have rather than address the issues 
>> listed above. Again, this is just a personal opinion.
>>
>
> It's just a problem of "who does the work", and we've got a terrible 
> track record at that.  But I grant that implementing containers is 
> fun, and I'm not doing the work, so I shut up :)
>
> Thanks,

-- 
Best Regards,

Fanaskov Vitaly
Senior Software Engineer

The Qt Company / Qt Quick and Widgets Team



More information about the Development mailing list