Re: [Development] How to port from Q_FOREACH to range-based for

2019-06-20 Thread André Pönitz
On Thu, Jun 20, 2019 at 08:44:40AM +, Frederik Gladhorn wrote: > On tirsdag 11. juni 2019 09:48:00 CEST Lars Knoll wrote: > > > On 11 Jun 2019, at 09:35, Olivier Goffart wrote: > > > > > > On 11.06.19 09:17, Lars Knoll wrote: > > > > > >> So, is removing it worth all the hassle to us and our

Re: [Development] How to port from Q_FOREACH to range-based for

2019-06-20 Thread Frederik Gladhorn
On tirsdag 11. juni 2019 09:48:00 CEST Lars Knoll wrote: > > On 11 Jun 2019, at 09:35, Olivier Goffart wrote: > > > > On 11.06.19 09:17, Lars Knoll wrote: > > > >> So, is removing it worth all the hassle to us and our users? Q_FOREACH is > >> a macro and it doesn’t really cost us anything to kee

Re: [Development] How to port from Q_FOREACH to range-based for

2019-06-12 Thread Kevin Kofler
Mutz, Marc via Development wrote: > This is a bit like the Fridays for Future generation clash: the new > developer asks "why is there Q_FOREACH if there's ranged-for?" and the > older devs answer: "because I wants my SUV, erhm, I mean Q_FOREACH". The difference is that Q_FOREACH does not destroy

Re: [Development] How to port from Q_FOREACH to range-based for

2019-06-12 Thread Mutz, Marc via Development
On 2019-06-12 08:23, Philippe wrote: On Wed, 12 Jun 2019 07:54:29 +0200 Nicolas Arnaud-Cormos via Development wrote: Whenever Qt is adding a new feature there's a teachability issue that needs to be handled. Any duplication with the C++ standard adds cognitive load to students. One could dis

Re: [Development] How to port from Q_FOREACH to range-based for

2019-06-11 Thread Philippe
On Wed, 12 Jun 2019 07:54:29 +0200 Nicolas Arnaud-Cormos via Development wrote: > Whenever Qt is adding a new feature there's a teachability issue that > needs to be handled. Any duplication with the C++ standard adds > cognitive load to students. > One could dismiss that by saying just use the

Re: [Development] How to port from Q_FOREACH to range-based for

2019-06-11 Thread Thiago Macieira
On Tuesday, 11 June 2019 22:54:29 PDT Nicolas Arnaud-Cormos via Development wrote: > Whenever Qt is adding a new feature there's a teachability issue that > needs to be handled. Any duplication with the C++ standard adds > cognitive load to students. Understood, but that will not stop us from add

Re: [Development] How to port from Q_FOREACH to range-based for

2019-06-11 Thread Nicolas Arnaud-Cormos via Development
On 11/06/2019 21:51, André Pönitz wrote: On Tue, Jun 11, 2019 at 08:47:12PM +0200, Mutz, Marc via Development wrote: On 2019-06-11 09:48, Lars Knoll wrote: On 11 Jun 2019, at 09:35, Olivier Goffart wrote: On 11.06.19 09:17, Lars Knoll wrote: So, is removing it worth all the hassle to us and

Re: [Development] How to port from Q_FOREACH to range-based for

2019-06-11 Thread André Pönitz
On Tue, Jun 11, 2019 at 08:47:12PM +0200, Mutz, Marc via Development wrote: > On 2019-06-11 09:48, Lars Knoll wrote: > > > On 11 Jun 2019, at 09:35, Olivier Goffart wrote: > > > > > > On 11.06.19 09:17, Lars Knoll wrote: > > > > So, is removing it worth all the hassle to us and our users? > > > >

Re: [Development] How to port from Q_FOREACH to range-based for

2019-06-11 Thread André Pönitz
On Tue, Jun 11, 2019 at 11:49:11AM +0200, Giuseppe D'Angelo wrote: > On 11/06/2019 09:17, Lars Knoll wrote: > > So, is removing it worth all the hassle to us and our users? Q_FOREACH is > > a macro and it doesn’t really cost us anything to keep it around. Yes, it > > has issues with non Qt containe

Re: [Development] How to port from Q_FOREACH to range-based for

2019-06-11 Thread Mutz, Marc via Development
On 2019-06-11 09:48, Lars Knoll wrote: On 11 Jun 2019, at 09:35, Olivier Goffart wrote: On 11.06.19 09:17, Lars Knoll wrote: So, is removing it worth all the hassle to us and our users? Q_FOREACH is a macro and it doesn’t really cost us anything to keep it around. Yes, it has issues with non

Re: [Development] How to port from Q_FOREACH to range-based for

2019-06-11 Thread Giuseppe D'Angelo via Development
On 11/06/2019 09:17, Lars Knoll wrote: So, is removing it worth all the hassle to us and our users? Q_FOREACH is a macro and it doesn’t really cost us anything to keep it around. Yes, it has issues with non Qt containers and I wouldn’t recommend it for any new code. In fact, I wasn't proposin

Re: [Development] How to port from Q_FOREACH to range-based for

2019-06-11 Thread Lars Knoll
> On 11 Jun 2019, at 09:35, Olivier Goffart wrote: > > On 11.06.19 09:17, Lars Knoll wrote: >> So, is removing it worth all the hassle to us and our users? Q_FOREACH is a >> macro and it doesn’t really cost us anything to keep it around. Yes, it has >> issues with non Qt containers and I wouldn

Re: [Development] How to port from Q_FOREACH to range-based for

2019-06-11 Thread Konstantin Tokarev
10.06.2019, 14:48, "Giuseppe D'Angelo" : > (Changing the subject to be on topic) > > On 10/06/2019 13:27, Konstantin Tokarev wrote: >>>  At the cost of saying for the 100th time, before this stuff ends up >>>  indexed by Google: you can port away from Q_FOREACH in an automated way >>>  only in tr

Re: [Development] How to port from Q_FOREACH to range-based for

2019-06-11 Thread Olivier Goffart
On 11.06.19 09:17, Lars Knoll wrote: So, is removing it worth all the hassle to us and our users? Q_FOREACH is a macro and it doesn’t really cost us anything to keep it around. Yes, it has issues with non Qt containers and I wouldn’t recommend it for any new code. But maybe we could simply fix

Re: [Development] How to port from Q_FOREACH to range-based for

2019-06-11 Thread Lars Knoll
> On 10 Jun 2019, at 13:48, Giuseppe D'Angelo via Development > wrote: > > (Changing the subject to be on topic) > > On 10/06/2019 13:27, Konstantin Tokarev wrote: >>> At the cost of saying for the 100th time, before this stuff ends up >>> indexed by Google: you can port away from Q_FOREACH in

[Development] How to port from Q_FOREACH to range-based for

2019-06-10 Thread Giuseppe D'Angelo via Development
(Changing the subject to be on topic) On 10/06/2019 13:27, Konstantin Tokarev wrote: At the cost of saying for the 100th time, before this stuff ends up indexed by Google: you can port away from Q_FOREACH in an automated way only in trivial cases.*NOT* in the general case. How is one supposed