Re: [Development] What's our policy on changing the result of qHash(T, 0) between major releases?

2024-02-06 Thread Thiago Macieira
On Tuesday, 6 February 2024 22:02:11 PST Marc Mutz via Development wrote: > As someone who argues that qHash("Hello"_L1) be restored to > qHash(u"Hello"_s) after this relation was broken somewhere in Qt 5, how > could I argue against it? :) It was commit ea8e48a6799cf742ea23f4a30dcfc38a4988fe56

Re: [Development] What's our policy on changing the result of qHash(T, 0) between major releases?

2024-02-06 Thread Marc Mutz via Development
On 05.02.24 23:42, Thiago Macieira wrote: > On Monday, 5 February 2024 01:36:39 PST Marc Mutz via Development wrote: >> I've always understood it such that we as Qt must preserve the property >> that the hash for equal elements is equal within _one_ run of _one_ >> process. This means you can use

Re: [Development] What's our policy on changing the result of qHash(T, 0) between major releases?

2024-02-06 Thread Marc Mutz via Development
On 05.02.24 19:07, apoenitz wrote: > On Mon, Feb 05, 2024 at 09:36:39AM +, Marc Mutz via Development wrote: >> Hi, >> >> I've always understood it such that we as Qt must preserve the property >> that the hash for equal elements is equal within _one_ run of _one_ >> process. > > This would

Re: [Development] What's our policy on changing the result of qHash(T, 0) between major releases?

2024-02-05 Thread Thiago Macieira
On Monday, 5 February 2024 01:36:39 PST Marc Mutz via Development wrote: > I've always understood it such that we as Qt must preserve the property > that the hash for equal elements is equal within _one_ run of _one_ > process. This means you can use the hash in I/O in any way. That's why > we

Re: [Development] What's our policy on changing the result of qHash(T, 0) between major releases?

2024-02-05 Thread Marc Mutz via Development
Hi, I've always understood it such that we as Qt must preserve the property that the hash for equal elements is equal within _one_ run of _one_ process. This means you can use the hash in I/O in any way. That's why we have qt_hash, which you _can_ (and do) use in I/O (but is private API,

Re: [Development] What's our policy on changing the result of qHash(T, 0) between major releases?

2024-02-04 Thread Thiago Macieira
On Sunday, 4 February 2024 06:12:18 PST Giuseppe D'Angelo via Development wrote: > Il 03/02/24 22:08, Thiago Macieira ha scritto: > > But what about a zero seed? It's what we call a "deterministic hashing". > > We > > have changed the algorithms on .0 releases (in both 5.0 and 6.0 for > >

Re: [Development] What's our policy on changing the result of qHash(T, 0) between major releases?

2024-02-04 Thread Giuseppe D'Angelo via Development
Il 03/02/24 22:08, Thiago Macieira ha scritto: But what about a zero seed? It's what we call a "deterministic hashing". We have changed the algorithms on .0 releases (in both 5.0 and 6.0 for QString). I don't think it means "deterministic" in the sense that the output will never change across

[Development] What's our policy on changing the result of qHash(T, 0) between major releases?

2024-02-03 Thread Thiago Macieira
Requirement: the qHash function in question is and has always been out-of- line. We obviously can't change the hashing function of inline code, because it may have been inlined. When the seed is non-zero, we make no guarantees on what the result will be. The result is allowed to change between