[Development] QList

Matthew Woehlke mwoehlke.floss at gmail.com
Wed Mar 29 20:27:16 CEST 2017


On 2017-03-29 14:11, Marc Mutz wrote:
> On 2017-03-29 18:57, Matthew Woehlke wrote:
>> I think the main reason some many people disagree with you on CoW and
>> related subjects is because you put performance above all else,
>> including correctness and ease of use.
> 
> Interesting. My criticism of CoW is about correctness _and_ performance.
> I have given the iterator-into-copied-container example several times
> now. Correctness issue.

I suspect that's not very common, or more people would complain about
it. It's also possible to implement CoW in a way that doesn't have this
issue. (I've done it, but I believe it would be impractical or
compatibility-breaking to retrofit into Qt containers. Also, it requires
some extra bookkeeping that probably doesn't improve performance.)

> I have also said that what I hate most about
> QList is how the memory layout depends on intricate details like the
> machine word size. Correctness issue.

Granted, but that isn't related to CoW. I have seen much less
disagreement on being consistent whether a container stores the items
indirectly.

-- 
Matthew




More information about the Development mailing list